fix(core): use windowsHide for hashRuntime

This commit is contained in:
Jonathan Cammisuli 2023-05-31 12:12:29 -04:00 committed by Victor Savkin
parent 5afe34e5d3
commit b0e3a1df4d

View File

@ -579,19 +579,27 @@ class TaskHasherImpl {
const mapKey = `runtime:${runtime}`; const mapKey = `runtime:${runtime}`;
if (!this.runtimeHashes[mapKey]) { if (!this.runtimeHashes[mapKey]) {
this.runtimeHashes[mapKey] = new Promise((res, rej) => { this.runtimeHashes[mapKey] = new Promise((res, rej) => {
exec(runtime, (err, stdout, stderr) => { exec(
if (err) { runtime,
rej( {
new Error(`Nx failed to execute {runtime: '${runtime}'}. ${err}.`) windowsHide: true,
); },
} else { (err, stdout, stderr) => {
const value = `${stdout}${stderr}`.trim(); if (err) {
res({ rej(
details: { [`runtime:${runtime}`]: value }, new Error(
value, `Nx failed to execute {runtime: '${runtime}'}. ${err}.`
}); )
);
} else {
const value = `${stdout}${stderr}`.trim();
res({
details: { [`runtime:${runtime}`]: value },
value,
});
}
} }
}); );
}); });
} }
return this.runtimeHashes[mapKey]; return this.runtimeHashes[mapKey];