diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2024-09-18 11:36:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-18 20:36:37 +0200 |
commit | c90b07457958518a8830798d8800f647f897d12f (patch) | |
tree | ac76cc6d777302199e4b94d43e6d64b9f9130a4b /cli/tools/task.rs | |
parent | 49a0b7ab938145730354b7d6e575075b5e406622 (diff) |
fix(flags): don't treat empty run command as task subcommand (#25708)
Diffstat (limited to 'cli/tools/task.rs')
-rw-r--r-- | cli/tools/task.rs | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/cli/tools/task.rs b/cli/tools/task.rs index e806d586c..ae91f53a7 100644 --- a/cli/tools/task.rs +++ b/cli/tools/task.rs @@ -36,19 +36,7 @@ pub async fn execute_script( let cli_options = factory.cli_options()?; let start_dir = &cli_options.start_dir; if !start_dir.has_deno_or_pkg_json() { - if task_flags.is_run { - bail!( - r#"deno run couldn't find deno.json(c). -If you meant to run a script, specify it, e.g., `deno run ./script.ts`. -To run a task, ensure the config file exists. -Examples: -- Script: `deno run ./script.ts` -- Task: `deno run dev` -See https://docs.deno.com/go/config"# - ) - } else { - bail!("deno task couldn't find deno.json(c). See https://docs.deno.com/go/config") - } + bail!("deno task couldn't find deno.json(c). See https://docs.deno.com/go/config") } let force_use_pkg_json = std::env::var_os(crate::task_runner::USE_PKG_JSON_HIDDEN_ENV_VAR_NAME) |