integration: make --datadir and --chain required #5041

This commit is contained in:
Alex Sharov 2022-08-13 21:46:25 +07:00 committed by GitHub
parent 778792e20e
commit 60ff998133
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,6 +99,7 @@ func withDataDir2(cmd *cobra.Command) {
func withDataDir(cmd *cobra.Command) {
cmd.Flags().StringVar(&datadirCli, "datadir", paths.DefaultDataDir(), "data directory for temporary ELT files")
must(cmd.MarkFlagRequired("datadir"))
must(cmd.MarkFlagDirname("datadir"))
cmd.Flags().StringVar(&chaindata, "chaindata", "", "path to the db")
@ -126,6 +127,7 @@ func withTxTrace(cmd *cobra.Command) {
func withChain(cmd *cobra.Command) {
cmd.Flags().StringVar(&chain, "chain", "mainnet", "pick a chain to assume (mainnet, ropsten, etc.)")
must(cmd.MarkFlagRequired("chain"))
}
func withHeimdall(cmd *cobra.Command) {