-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gnokey does not accept -pkgpath #555
Comments
Hey @tadvi, Thank you for opening up an issue 🙏 I'll look into this and get back to you soon with what I find |
Hey @tadvi, It seems to be related with the way you're calling the command:
So having these fixes in mind, this should work: I'll look into whether or not this flag positioning is strict in terms of subcommand invocation (this is probably enforced by the cli package we use). In the meantime, the command I've written down should work |
Did Now on commit 001eb58 . Did Same issue. Still getting error message "pkgpath not specified" . |
How are you running or are you running the globally installed binary: If you are doing the latter, you need to install the updated binary again: EDIT: |
make build Run Then cd into build directory and run like this: ./gnokey maketx addpkg -deposit "1ugnot" -gas-fee "1ugnot" -gas-wanted "5000000" -broadcast -remote "localhost:26657" -chainid "dev" -pkgdir "." -pkgpath "gno.land/r/demo/hello" test1 This panics with :
./gnokey maketx addpkg -deposit "1ugnot" -gas-fee "1ugnot" -gas-wanted "5000000" -remote "localhost:26657" -chainid "dev" -pkgdir "." -pkgpath "gno.land/r/demo/hello" test1 This keeps printing stream of byte values what appears to be infinite loop. |
Commit aa8a7d8 Tried both : ./gnokey maketx addpkg -deposit "1ugnot" -gas-fee "1ugnot" -gas-wanted "5000000" "true" -remote "localhost:26657" -chainid "dev" -pkgdir "." -pkgpath "gno.land/r/demo/hello" test1
Both fail with "pkgpath not specified". My hello.gno file is in /build directory: // hello.gno
package types
import (
"errors"
"gno.land/p/demo/avl"
)
var (
gInt int = -42
gUint uint = 42
gString string = "a string"
gStringSlice []string = []string{"a", "string", "slice"}
gError error = errors.New("an error")
gIntSlice []int = []int{-42, 0, 42}
gUintSlice []uint = []uint{0, 42, 84}
gTree avl.Tree
)
func init() {
gTree.Set("a", gInt)
gTree.Set("A", "A FOR ALPHA")
gTree.Set("1", "1 for one")
gTree.Set("b", "b for beta")
gTree.Set("g", "g for gamma")
gTree.Set("!", "! for !")
gTree.Set("d", "d for delta")
gTree.Set("%", "% for percent")
gTree.Set("|", "| for pipeline")
} |
You need to drop This works fine: as well as this (with |
I'm not sure but would you try that
|
Thanks. I am making progress: ./gnokey maketx addpkg -deposit "1ugnot" -gas-fee "1ugnot" -gas-wanted "5000000" -broadcast -remote "localhost:26657" -chainid "dev" -pkgdir "." -pkgpath "gno.land/r/demo/hello" test1 This runs for awhile then gives this error:
|
Commit a693e08 Still produces error due to CLI parameter not getting set. build/gnokey maketx addpkg -deposit "1ugnot" -gas-fee "1ugnot" -gas-wanted "5000000" -remote "localhost:26657" -chainid "dev" -pkgdir "." -pkgpath "gno.land/r/demo/hello" test1
panic: cannot create package with invalid name ""
goroutine 1 [running]:
github.com/gnolang/gno/pkgs/gnolang.validatePkgName({0x0, 0x0})
/home/tad/sage/gno/pkgs/gnolang/nodes.go:2023 +0x9f
github.com/gnolang/gno/pkgs/gnolang.ReadMemPackage({0x7ffdcf99f2a8, 0x1}, {0x7ffdcf99f2b3, 0x15})
/home/tad/sage/gno/pkgs/gnolang/nodes.go:1131 +0xe5
github.com/gnolang/gno/pkgs/crypto/keys/client.execAddPkg(0xc000123f40, {0xc000036230?, 0x1, 0x1}, 0xf?)
/home/tad/sage/gno/pkgs/crypto/keys/client/addpkg.go:98 +0x165
github.com/gnolang/gno/pkgs/crypto/keys/client.newAddPkgCmd.func1({0x0?, 0x0?}, {0xc000036230, 0x1, 0x1})
/home/tad/sage/gno/pkgs/crypto/keys/client/addpkg.go:38 +0x4d
|
This is unrelated to the CLI, and it has to do with how Please check the |
CLI stopped working
Description
Fails to read some CLI parameters
Your environment
Steps to reproduce
Trying to run this:
fails with error: "pkgpath not specified"
Tried few other permutations of "pkgpath". All fail.
Proposed solution
My guess: CLI refactor broke some of the CLI parameter parsing.
The text was updated successfully, but these errors were encountered: