feat(task): log task script (#13922)

Logs task name and associated script with additional args.
This is disabled if "--quiet/-q" flag is present.
This commit is contained in:
Bartek Iwańczuk 2022-03-12 02:35:18 +01:00 committed by GitHub
parent 1a764790f2
commit 9d9e60b694
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 4 deletions

View file

@ -81,6 +81,12 @@ pub async fn execute_script(
.collect::<Vec<_>>()
.join(" ");
let script = format!("{} {}", script, additional_args);
log::info!(
"{} {} {}",
colors::green("Task"),
colors::cyan(&task_name),
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>>();