From 0a8ef85f2f8237aa67e866e7eba8985e47ff9b86 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 2 Apr 2026 10:43:12 +0100 Subject: [PATCH] Fix hak check for matrix-seshat (#33030) --- apps/desktop/hak/matrix-seshat/check.ts | 6 +++--- apps/desktop/scripts/hak/hakEnv.ts | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/desktop/hak/matrix-seshat/check.ts b/apps/desktop/hak/matrix-seshat/check.ts index e207451832..99a107eb5a 100644 --- a/apps/desktop/hak/matrix-seshat/check.ts +++ b/apps/desktop/hak/matrix-seshat/check.ts @@ -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) diff --git a/apps/desktop/scripts/hak/hakEnv.ts b/apps/desktop/scripts/hak/hakEnv.ts index edab24419b..4ce382dc11 100644 --- a/apps/desktop/scripts/hak/hakEnv.ts +++ b/apps/desktop/scripts/hak/hakEnv.ts @@ -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);