Fix hak check for matrix-seshat (#33030)

This commit is contained in:
Michael Telatynski 2026-04-02 10:43:12 +01:00 committed by GitHub
parent 4315038346
commit 0a8ef85f2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -27,10 +27,10 @@ export default async function (hakEnv: HakEnv, moduleInfo: DependencyInfo): Prom
try {
// node-gyp uses python for reasons beyond comprehension
await hakEnv.checkTools([["python", "--version"]]);
} catch {
// try python3 too
// Try python3 first, to get a more sensible error if python is not found in the fallback
await hakEnv.checkTools([["python3", "--version"]]);
} catch {
await hakEnv.checkTools([["python", "--version"]]);
}
// Ensure Rust target exists (nb. we avoid depending on rustup)

View File

@ -103,6 +103,9 @@ export default class HakEnv {
shell: this.isWin(),
...options,
});
proc.on("error", (err) => {
reject(err);
});
proc.on("exit", (code) => {
if (code) {
reject(code);