From 16491f3d7fb28e1092dce7651bbbc32314da5db0 Mon Sep 17 00:00:00 2001 From: Merlin Ran Date: Wed, 13 Oct 2021 15:43:22 -0400 Subject: [PATCH] mask more flags; print error loading config Signed-off-by: Merlin Ran --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 184de9b..8ee2c31 100644 --- a/main.go +++ b/main.go @@ -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()) @@ -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))