From 1258d0cf7db31f47ffdd3b48e598f5ab8243ea86 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 2 Sep 2025 17:37:57 +0300 Subject: [PATCH] chore(dx/desktop): read electron version from package.json --- apps/desktop/scripts/rebuild.mts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/desktop/scripts/rebuild.mts b/apps/desktop/scripts/rebuild.mts index f367c3cde..25b341ada 100644 --- a/apps/desktop/scripts/rebuild.mts +++ b/apps/desktop/scripts/rebuild.mts @@ -3,6 +3,7 @@ import { cpSync, existsSync, mkdirSync, readFileSync, rmSync } from "fs"; import { execSync } from "child_process"; import { rebuild } from "@electron/rebuild" import { isNixOS, resetPath } from "../../../scripts/utils.mjs"; +import packageJson from "../package.json" with { type: "json" }; const desktopProjectRoot = join(import.meta.dirname, ".."); const workspaceRoot = join(desktopProjectRoot, "../.."); @@ -36,8 +37,6 @@ function rebuildNativeDependencies() { if (isNixOS()) { console.log("Patching ELF..."); - - return execSync(`nix-shell -p auto-patchelf gcc.cc.lib --run "auto-patchelf --paths node_modules/better-sqlite3/build/Release/better_sqlite3.node --libs ${libStdPath}"`, { cwd: desktopProjectRoot, stdio: "inherit" @@ -58,6 +57,7 @@ function determineElectronVersion() { } } else { console.log("Using Electron version from package.json"); + return packageJson.devDependencies.electron; } }