diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-03-15 21:24:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-15 21:24:07 -0400 |
commit | 748aff1e946a057820f1cb219344baf44a870fc1 (patch) | |
tree | cefe80350fda6c4dacf04fdb859d86c4febf9836 /cli/tools/task.rs | |
parent | a7bef54d3f5517e8fd7508d47b6f56616e858695 (diff) |
feat(task): add unstable warning to `deno task` (#13966)
Diffstat (limited to 'cli/tools/task.rs')
-rw-r--r-- | cli/tools/task.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cli/tools/task.rs b/cli/tools/task.rs index 3003bdfcc..578fd1100 100644 --- a/cli/tools/task.rs +++ b/cli/tools/task.rs @@ -52,6 +52,10 @@ pub async fn execute_script( flags: Flags, task_flags: TaskFlags, ) -> Result<i32, AnyError> { + log::warn!( + "{} deno task is unstable and may drastically change in the future", + crate::colors::yellow("Warning"), + ); let flags = Arc::new(flags); let ps = ProcState::build(flags.clone()).await?; let tasks_config = get_tasks_config(ps.maybe_config_file.as_ref())?; @@ -81,13 +85,14 @@ pub async fn execute_script( .collect::<Vec<_>>() .join(" "); let script = format!("{} {}", script, additional_args); + let script = script.trim(); log::info!( "{} {} {}", colors::green("Task"), colors::cyan(&task_name), - script + script, ); - let seq_list = deno_task_shell::parser::parse(&script) + let seq_list = deno_task_shell::parser::parse(script) .with_context(|| format!("Error parsing script '{}'.", task_name))?; let env_vars = std::env::vars().collect::<HashMap<String, String>>(); let exit_code = deno_task_shell::execute(seq_list, env_vars, cwd).await; |