Skip to content

Commit

Permalink
fix(cli): deno task exit with status 0
Browse files Browse the repository at this point in the history
denoland#25632

Exit code 1 indiciates some sort of failure but `deno task` (without
arguments) is used to list available commands.
  • Loading branch information
littledivy committed Sep 14, 2024
1 parent 68dc242 commit f0389f5
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cli/tools/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ See https://docs.deno.com/go/config"#
&cli_options.start_dir,
&tasks_config,
)?;
return Ok(1);
return Ok(0);
}
};

Expand Down
2 changes: 1 addition & 1 deletion tests/specs/task/both_no_arg/__test__.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"envs": {
"NO_COLOR": "1"
},
"exitCode": 1
"exitCode": 0
}
2 changes: 1 addition & 1 deletion tests/specs/task/doc_comments_no_args/__test__.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"args": "task",
"envs": { "NO_COLOR": "1" },
"output": "task.out",
"exitCode": 1
"exitCode": 0
}
2 changes: 1 addition & 1 deletion tests/specs/task/no_args/__test__.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"envs": {
"NO_COLOR": "1"
},
"exitCode": 1
"exitCode": 0
}
2 changes: 1 addition & 1 deletion tests/specs/task/package_json_no_arg/__test__.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"envs": {
"NO_COLOR": "1"
},
"exitCode": 1
"exitCode": 0
}
2 changes: 1 addition & 1 deletion tests/specs/task/pre_post/__test__.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"envs": {
"NO_COLOR": "1"
},
"exitCode": 0
"exitCode": 1
}
8 changes: 4 additions & 4 deletions tests/specs/task/workspace/__test__.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
"root": {
"args": "task",
"output": "root.out",
"exitCode": 1
"exitCode": 0
},
"package_a": {
"args": "task",
"cwd": "package-a",
"output": "package-a.out",
"exitCode": 1
"exitCode": 0
},
"package_b": {
"args": "task",
"cwd": "package-b",
"output": "package-b.out",
"exitCode": 1
"exitCode": 0
},
"scripts": {
"args": "task",
"cwd": "scripts",
"output": "scripts.out",
"exitCode": 1
"exitCode": 0
},
"package_b_tasks": {
"steps": [{
Expand Down

0 comments on commit f0389f5

Please sign in to comment.