From 21d60201792cb3176741ef174a4a6878a26c0670 Mon Sep 17 00:00:00 2001 From: Phi-rjan Date: Tue, 7 Feb 2023 16:47:30 +0100 Subject: [PATCH] Update cmd/lotus-worker/tasks.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ɓukasz Magiera --- cmd/lotus-worker/tasks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/lotus-worker/tasks.go b/cmd/lotus-worker/tasks.go index aee059989..73ca5eb0a 100644 --- a/cmd/lotus-worker/tasks.go +++ b/cmd/lotus-worker/tasks.go @@ -75,7 +75,7 @@ func taskAction(tf func(a api.Worker, ctx context.Context, tt sealtasks.TaskType return xerrors.Errorf("Cannot use --all flag with task type argument") } - if cctx.NArg() == 0 && !allFlag { + if cctx.NArg() != 1 && !allFlag { return xerrors.Errorf("Expected 1 argument or use --all flag") }