Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Commit

Permalink
mask more flags; print error loading config
Browse files Browse the repository at this point in the history
Signed-off-by: Merlin Ran <merlinran@gmail.com>
  • Loading branch information
merlinran committed Oct 13, 2021
1 parent 9cc4f17 commit 16491f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ Zero means no limits`,
v.SetConfigName("config")
v.AddConfigPath(os.Getenv("BIDBOT_PATH"))
v.AddConfigPath(defaultConfigPath)
_ = v.ReadInConfig()
err := v.ReadInConfig()
cli.CheckErrf(fmt.Sprintf("loading config from %s: %%v", v.ConfigFileUsed()), err)
})

cli.ConfigureCLI(v, "BIDBOT", commonFlags, rootCmd.PersistentFlags())
Expand Down Expand Up @@ -323,7 +324,7 @@ var daemonCmd = &cobra.Command{
cli.CheckErrf("getting peer config: %v", err)

settings, err := cli.MarshalConfig(v, !v.GetBool("log-json"),
"private-key", "wallet-addr-sig", "lotus-miner-api-token")
"cid-gravity-key", "private-key", "wallet-addr-sig", "lotus-miner-api-token", "lotus-market-api-token")
cli.CheckErrf("marshaling config: %v", err)
log.Infof("loaded config from %s: %s", v.ConfigFileUsed(), string(settings))

Expand Down

0 comments on commit 16491f3

Please sign in to comment.