Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken variable resolve #63692

Merged
merged 1 commit into from Nov 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/vs/workbench/api/electron-browser/mainThreadTask.ts
Expand Up @@ -528,7 +528,7 @@ export class MainThreadTask implements MainThreadTaskShape {
process: undefined as string,
variables: new Map<string, string>()
};
Object.keys(values.variables).forEach(key => result.variables.set(key, values[key]));
Object.keys(values.variables).forEach(key => result.variables.set(key, values.variables[key]));
if (Types.isString(values.process)) {
result.process = values.process;
}
Expand Down
Expand Up @@ -380,7 +380,12 @@ export class TerminalTaskSystem implements ITaskSystem {
resolveSet.process.path = envPath;
}
}
resolvedVariables = taskSystemInfo.resolveVariables(workspaceFolder, resolveSet);
resolvedVariables = taskSystemInfo.resolveVariables(workspaceFolder, resolveSet).then(resolved => {
if ((taskSystemInfo.platform !== Platform.Platform.Windows) && isProcess) {
resolved.variables.set(TerminalTaskSystem.ProcessVarName, CommandString.value(task.command.name));
}
return Promise.resolve(resolved);
});
} else {
let result = new Map<string, string>();
variables.forEach(variable => {
Expand Down