diff --git a/cmd/lotus-miner/sectors.go b/cmd/lotus-miner/sectors.go index e2abee52f..4ef00d11f 100644 --- a/cmd/lotus-miner/sectors.go +++ b/cmd/lotus-miner/sectors.go @@ -1932,7 +1932,10 @@ var sectorsBatchingPendingCommit = &cli.Command{ userInput = strings.ToLower(strings.TrimSpace(userInput)) if userInput == "yes" { - cctx.Set("publish-now", "true") + err := cctx.Set("publish-now", "true") + if err != nil { + return xerrors.Errorf("setting publish-now flag: %w", err) + } return cctx.Command.Action(cctx) } else if userInput == "no" { return nil @@ -1940,7 +1943,6 @@ var sectorsBatchingPendingCommit = &cli.Command{ fmt.Println("Invalid input. Please answer with 'yes' or 'no'.") return nil } - } fmt.Println("No sectors queued to be committed") return nil @@ -2007,7 +2009,10 @@ var sectorsBatchingPendingPreCommit = &cli.Command{ userInput = strings.ToLower(strings.TrimSpace(userInput)) if userInput == "yes" { - cctx.Set("publish-now", "true") + err := cctx.Set("publish-now", "true") + if err != nil { + return xerrors.Errorf("setting publish-now flag: %w", err) + } return cctx.Command.Action(cctx) } else if userInput == "no" { return nil