emerald-vault-archive icon indicating copy to clipboard operation
emerald-vault-archive copied to clipboard

Accept --chain and --base-path from command line

Open gagarin55 opened this issue 5 years ago • 7 comments

As a user I expect something like:

emerald account new --base-path=./ --chain=eth

gagarin55 avatar Mar 26 '19 11:03 gagarin55

Just as a supplement to working emerald --base-path=. --chain=eth account new?

ghost avatar Apr 04 '19 19:04 ghost

Yes, right. Currently it reads the path from env variable, but should be able to get as an option too

splix avatar Apr 04 '19 19:04 splix

But, the console already supports this option explicitly, try for example - emerald --base-path=abc --chain=eth account new [1]?

[1] https://github.com/ETCDEVTeam/emerald-vault/blob/master/cli.yml#L16

ghost avatar Apr 04 '19 19:04 ghost

@gagarin55 ^^^

splix avatar Apr 04 '19 19:04 splix

Environment variable is taken only if the --base-path option is not specified explicitly - https://github.com/ETCDEVTeam/emerald-vault/blob/master/src/cmd/mod.rs#L39

ghost avatar Apr 04 '19 19:04 ghost

AFAIK there was a problem in some of the cases when it didn't accept it from command line. @gagarin55 can provide more details

splix avatar Apr 04 '19 20:04 splix

May be it was wrong sequence, for example emerald --base-path=. ... works, but emerald ... --base-path=. isnt't. It works only if options stay before command, not after. But anyway, I am waiting for more details.

ghost avatar Apr 04 '19 20:04 ghost