mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-07 11:11:30 +00:00
Use cwd to run package.json script (#12700)
Fixes case when `package.json` is not in root directory. Usually in mono repository, where multiple `package.json` may be present Release Notes: - Fixed runnable for package.json in monorepos
This commit is contained in:
parent
377e24b798
commit
3000f6ea22
1 changed files with 2 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue