summaryrefslogtreecommitdiff
path: root/internal/cli/run.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cli/run.go')
-rw-r--r--internal/cli/run.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/cli/run.go b/internal/cli/run.go
index c666406..ed831f5 100644
--- a/internal/cli/run.go
+++ b/internal/cli/run.go
@@ -36,6 +36,10 @@ func newRunCmd() *cobra.Command {
}
func runTasks(file string, parallel int, dryRun bool) error {
+ if parallel < 1 {
+ return fmt.Errorf("--parallel must be at least 1, got %d", parallel)
+ }
+
tasks, err := task.ParseFile(file)
if err != nil {
return fmt.Errorf("parsing: %w", err)