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,10 +579,17 @@ 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(
runtime,
{
windowsHide: true,
},
(err, stdout, stderr) => {
if (err) { if (err) {
rej( rej(
new Error(`Nx failed to execute {runtime: '${runtime}'}. ${err}.`) new Error(
`Nx failed to execute {runtime: '${runtime}'}. ${err}.`
)
); );
} else { } else {
const value = `${stdout}${stderr}`.trim(); const value = `${stdout}${stderr}`.trim();
@ -591,7 +598,8 @@ class TaskHasherImpl {
value, value,
}); });
} }
}); }
);
}); });
} }
return this.runtimeHashes[mapKey]; return this.runtimeHashes[mapKey];