Fix hak check for matrix-seshat (#33030)
This commit is contained in:
@@ -27,10 +27,10 @@ export default async function (hakEnv: HakEnv, moduleInfo: DependencyInfo): Prom
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// node-gyp uses python for reasons beyond comprehension
|
// node-gyp uses python for reasons beyond comprehension
|
||||||
await hakEnv.checkTools([["python", "--version"]]);
|
// Try python3 first, to get a more sensible error if python is not found in the fallback
|
||||||
} catch {
|
|
||||||
// try python3 too
|
|
||||||
await hakEnv.checkTools([["python3", "--version"]]);
|
await hakEnv.checkTools([["python3", "--version"]]);
|
||||||
|
} catch {
|
||||||
|
await hakEnv.checkTools([["python", "--version"]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure Rust target exists (nb. we avoid depending on rustup)
|
// Ensure Rust target exists (nb. we avoid depending on rustup)
|
||||||
|
|||||||
@@ -103,6 +103,9 @@ export default class HakEnv {
|
|||||||
shell: this.isWin(),
|
shell: this.isWin(),
|
||||||
...options,
|
...options,
|
||||||
});
|
});
|
||||||
|
proc.on("error", (err) => {
|
||||||
|
reject(err);
|
||||||
|
});
|
||||||
proc.on("exit", (code) => {
|
proc.on("exit", (code) => {
|
||||||
if (code) {
|
if (code) {
|
||||||
reject(code);
|
reject(code);
|
||||||
|
|||||||
Reference in New Issue
Block a user