提交 5b702dc0 编写于 作者: D Dirk Baeumer

Fixes #8143: tasks.json - cwd property in task objects

上级 f740abf9
......@@ -484,7 +484,15 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem {
}
}
if (options.cwd) {
shellLaunchConfig.cwd = options.cwd;
let cwd = options.cwd;
if (!path.isAbsolute(cwd)) {
let workspaceFolder = Task.getWorkspaceFolder(task);
if (workspaceFolder.uri.scheme === 'file') {
cwd = path.join(workspaceFolder.uri.fsPath, cwd);
}
}
// This must be normalized to the OS
shellLaunchConfig.cwd = path.normalize(cwd);
}
if (options.env) {
shellLaunchConfig.env = options.env;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册