mirror of
https://github.com/zed-industries/zed.git
synced 2026-08-24 16:34:46 +00:00
# Objective npm tasks in VS Code support a `path` property which works like `options.cwd` but it's always relative to the workspace folder. ## Solution `cwd` is being set based on `path` of npm tasks. If `options.cwd` is also set, it wins over the `path` property. This matches the behavior of VS Code. ## Testing A new test case has been added, testing deserialization of `path` and `options.cwd`. ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [ ] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [ ] Performance impact has been considered and is acceptable --- Release Notes: - Added support for `path` property on VS Code npm tasks
29 lines
635 B
JSON
29 lines
635 B
JSON
{
|
|
"version": "2.0.0",
|
|
"tasks": [
|
|
{
|
|
"label": "Without args",
|
|
"group": "build",
|
|
"type": "shell",
|
|
"command": "cargo build --package rust-analyzer",
|
|
"problemMatcher": "$rustc"
|
|
},
|
|
{
|
|
"label": "With args",
|
|
"type": "shell",
|
|
"command": "node",
|
|
"args": [
|
|
"${workspaceFolder}/node_modules/typescript/lib/tsc.js",
|
|
"--build",
|
|
"${workspaceFolder}/src",
|
|
"--watch"
|
|
],
|
|
"group": "build"
|
|
},
|
|
{
|
|
"label": "Ignored task without type",
|
|
"dependsOn": ["Without args", "With args"],
|
|
"problemMatcher": "$rustc"
|
|
}
|
|
]
|
|
}
|