From 2065a74d83a796dbf8d2330fb0ce5c287e1dd849 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Thu, 29 Jan 2026 10:11:43 -0500 Subject: [PATCH] chore: allow installation as root in CI environments --- preinstall.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preinstall.js b/preinstall.js index 1b8af30..fe28667 100644 --- a/preinstall.js +++ b/preinstall.js @@ -10,7 +10,7 @@ const isWin = process.platform === 'win32'; // Check if running as root on Linux/macOS and abort if so. // See: https://github.com/electron/build-tools/issues/789. -if (!isWin && process.getuid?.() === 0) { +if (!process.env.CI && !isWin && process.getuid?.() === 0) { console.error( 'Do not install @electron/build-tools with sudo, as this causes issues for standard users.\n\n' + 'Please install Node.js via a version manager (e.g., nvm, fnm, or Homebrew) to\n' +