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

Handle ${__process__} on non-Windows #63208

Merged
merged 1 commit into from
Nov 15, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Handle on non-Windows
related to #63104
  • Loading branch information
alexr00 committed Nov 15, 2018
commit 882876dd27bb6f027f17d4a43518a00ac9054cca
Original file line number Diff line number Diff line change
Expand Up @@ -349,12 +349,18 @@ export class TerminalTaskSystem implements ITaskSystem {
variables.forEach(variable => {
result.set(variable, this.configurationResolverService.resolve(workspaceFolder, variable));
});
if (Platform.isWindows && isProcess) {
result.set(TerminalTaskSystem.ProcessVarName, win32.findExecutable(
this.configurationResolverService.resolve(workspaceFolder, CommandString.value(task.command.name)),
cwd ? this.configurationResolverService.resolve(workspaceFolder, cwd) : undefined,
envPath ? envPath.split(path.delimiter).map(p => this.configurationResolverService.resolve(workspaceFolder, p)) : undefined
));
if (isProcess) {
let processVarValue: string;
if (Platform.isWindows) {
processVarValue = win32.findExecutable(
this.configurationResolverService.resolve(workspaceFolder, CommandString.value(task.command.name)),
cwd ? this.configurationResolverService.resolve(workspaceFolder, cwd) : undefined,
envPath ? envPath.split(path.delimiter).map(p => this.configurationResolverService.resolve(workspaceFolder, p)) : undefined
);
} else {
processVarValue = this.configurationResolverService.resolve(workspaceFolder, CommandString.value(task.command.name));
}
result.set(TerminalTaskSystem.ProcessVarName, processVarValue);
}
variableResolver = TPromise.as(new VariableResolver(workspaceFolder, taskSystemInfo, result, this.configurationResolverService));
}
Expand Down