summaryrefslogtreecommitdiff
path: root/cli/tools/task.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools/task.rs')
-rw-r--r--cli/tools/task.rs21
1 files changed, 17 insertions, 4 deletions
diff --git a/cli/tools/task.rs b/cli/tools/task.rs
index 9b76f256c..65601aa69 100644
--- a/cli/tools/task.rs
+++ b/cli/tools/task.rs
@@ -60,11 +60,28 @@ pub async fn execute_script(
.await;
Ok(exit_code)
} else if let Some(script) = package_json_scripts.get(task_name) {
+ if let Some(package_deps) = ps.package_json_deps_installer.package_deps() {
+ for (key, value) in package_deps {
+ if let Err(err) = value {
+ log::info!(
+ "{} Ignoring dependency '{}' in package.json because its version requirement failed to parse: {:#}",
+ colors::yellow("Warning"),
+ key,
+ err,
+ );
+ }
+ }
+ }
ps.package_json_deps_installer
.ensure_top_level_install()
.await?;
ps.npm_resolver.resolve_pending().await?;
+ log::info!(
+ "{} Currently only basic package.json `scripts` are supported. Programs like `rimraf` or `cross-env` will not work correctly. This will be fixed in the upcoming release.",
+ colors::yellow("Warning"),
+ );
+
let cwd = match task_flags.cwd {
Some(path) => canonicalize_path(&PathBuf::from(path))?,
None => maybe_package_json
@@ -76,10 +93,6 @@ pub async fn execute_script(
.to_owned(),
};
let script = get_script_with_args(script, &ps);
- log::info!(
- "{} Currently only basic package.json `scripts` are supported. Programs like `rimraf` or `cross-env` will not work correctly. This will be fixed in the upcoming release.",
- colors::yellow("Warning"),
- );
output_task(task_name, &script);
let seq_list = deno_task_shell::parser::parse(&script)
.with_context(|| format!("Error parsing script '{task_name}'."))?;