Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Use cwd to run package.json script (#12700)
Nycheporuk Zakhar3000f6ea22cb
diff --git a/crates/languages/src/json.rs b/crates/languages/src/json.rsindex 34853da7a68..217edcf91a9 100644--- a/crates/languages/src/json.rs+++ b/crates/languages/src/json.rs@@ -29,14 +29,14 @@ pub(super) fn json_task_context() -> ContextProviderWithTasks {ContextProviderWithTasks::new(TaskTemplates(vec![TaskTemplate {label: "package script $ZED_CUSTOM_script".to_owned(),- command: "npm run".to_owned(),+ command: "npm --prefix $ZED_DIRNAME run".to_owned(),args: vec![VariableName::Custom("script".into()).template_value()],tags: vec!["package-script".into()],..TaskTemplate::default()},TaskTemplate {label: "composer script $ZED_CUSTOM_script".to_owned(),- command: "composer".to_owned(),+ command: "composer -d $ZED_DIRNAME".to_owned(),args: vec![VariableName::Custom("script".into()).template_value()],tags: vec!["composer-script".into()],..TaskTemplate::default()