Adopt async configuration resolver in Tasks

Part of #108804
This commit is contained in:
Alex Ross
2021-03-31 17:36:49 +02:00
parent 0b8a7ca21a
commit d05d8ca4c2
4 changed files with 65 additions and 50 deletions

View File

@@ -153,19 +153,19 @@ export class ExtHostTask extends ExtHostTaskBase {
}
};
for (let variable of toResolve.variables) {
result.variables[variable] = resolver.resolve(ws, variable);
result.variables[variable] = await resolver.resolveAsync(ws, variable);
}
if (toResolve.process !== undefined) {
let paths: string[] | undefined = undefined;
if (toResolve.process.path !== undefined) {
paths = toResolve.process.path.split(path.delimiter);
for (let i = 0; i < paths.length; i++) {
paths[i] = resolver.resolve(ws, paths[i]);
paths[i] = await resolver.resolveAsync(ws, paths[i]);
}
}
result.process = await win32.findExecutable(
resolver.resolve(ws, toResolve.process.name),
toResolve.process.cwd !== undefined ? resolver.resolve(ws, toResolve.process.cwd) : undefined,
await resolver.resolveAsync(ws, toResolve.process.name),
toResolve.process.cwd !== undefined ? await resolver.resolveAsync(ws, toResolve.process.cwd) : undefined,
paths
);
}