From 748aff1e946a057820f1cb219344baf44a870fc1 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 15 Mar 2022 21:24:07 -0400 Subject: feat(task): add unstable warning to `deno task` (#13966) --- cli/tools/task.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'cli/tools') 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 { + 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::>() .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::>(); let exit_code = deno_task_shell::execute(seq_list, env_vars, cwd).await; -- cgit v1.2.3