Skip to content

Commit 0a8ef85

Browse files
authored
Fix hak check for matrix-seshat (#33030)
1 parent 4315038 commit 0a8ef85

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

apps/desktop/hak/matrix-seshat/check.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ export default async function (hakEnv: HakEnv, moduleInfo: DependencyInfo): Prom
2727

2828
try {
2929
// node-gyp uses python for reasons beyond comprehension
30-
await hakEnv.checkTools([["python", "--version"]]);
31-
} catch {
32-
// try python3 too
30+
// Try python3 first, to get a more sensible error if python is not found in the fallback
3331
await hakEnv.checkTools([["python3", "--version"]]);
32+
} catch {
33+
await hakEnv.checkTools([["python", "--version"]]);
3434
}
3535

3636
// Ensure Rust target exists (nb. we avoid depending on rustup)

apps/desktop/scripts/hak/hakEnv.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ export default class HakEnv {
103103
shell: this.isWin(),
104104
...options,
105105
});
106+
proc.on("error", (err) => {
107+
reject(err);
108+
});
106109
proc.on("exit", (code) => {
107110
if (code) {
108111
reject(code);

0 commit comments

Comments
 (0)