Skip to content

Commit

Permalink
fix: use new root with config
Browse files Browse the repository at this point in the history
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
  • Loading branch information
gfanton committed Nov 20, 2023
1 parent 3bd97b5 commit f24d5ec
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
8 changes: 2 additions & 6 deletions gno.land/cmd/gnokey/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,11 @@ import (

func main() {
baseCfg := client.BaseOptions{
Home: gnoenv.HomeDir(),
Remote: "127.0.0.1:26657",
Quiet: false,
InsecurePasswordStdin: false,
Config: "",
Home: gnoenv.HomeDir(),
Remote: "127.0.0.1:26657",
}

Check warning on line 17 in gno.land/cmd/gnokey/main.go

View check run for this annotation

Codecov / codecov/patch

gno.land/cmd/gnokey/main.go#L14-L17

Added lines #L14 - L17 were not covered by tests

cmd := client.NewRootCmdWithBaseConfig(commands.NewDefaultIO(), baseCfg)

Check warning on line 19 in gno.land/cmd/gnokey/main.go

View check run for this annotation

Codecov / codecov/patch

gno.land/cmd/gnokey/main.go#L19

Added line #L19 was not covered by tests

if err := cmd.ParseAndRun(context.Background(), os.Args[1:]); err != nil {
_, _ = fmt.Fprintf(os.Stderr, "%+v\n", err)

Expand Down
9 changes: 0 additions & 9 deletions gnovm/cmd/gno/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ type envVar struct {
Value string
}

func getEnvVar(vars []envVar, key string) string {
for _, env := range vars {
if env.Key == key {
return env.Value
}
}
return ""
}

func findEnv(env []envVar, name string) string {
for _, e := range env {
if e.Key == name {
Expand Down
8 changes: 7 additions & 1 deletion tm2/pkg/crypto/keys/client/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ type baseCfg struct {
}

func NewRootCmd(io commands.IO) *commands.Command {
cfg := &baseCfg{}
return NewRootCmdWithBaseConfig(io, DefaultBaseOptions)

Check warning on line 22 in tm2/pkg/crypto/keys/client/root.go

View check run for this annotation

Codecov / codecov/patch

tm2/pkg/crypto/keys/client/root.go#L22

Added line #L22 was not covered by tests
}

func NewRootCmdWithBaseConfig(io commands.IO, base BaseOptions) *commands.Command {
cfg := &baseCfg{
BaseOptions: base,
}

Check warning on line 28 in tm2/pkg/crypto/keys/client/root.go

View check run for this annotation

Codecov / codecov/patch

tm2/pkg/crypto/keys/client/root.go#L25-L28

Added lines #L25 - L28 were not covered by tests

cmd := commands.NewCommand(
commands.Metadata{
Expand Down

0 comments on commit f24d5ec

Please sign in to comment.