Update cmd/lotus-worker/tasks.go

Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
This commit is contained in:
Phi-rjan 2023-02-07 16:47:30 +01:00 committed by GitHub
parent 3fc1346d5b
commit 21d6020179
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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") 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") return xerrors.Errorf("Expected 1 argument or use --all flag")
} }