From 1c5edbd309ff188fc7f1c1fe66741bab1ac4997d Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Wed, 11 Mar 2026 17:18:25 -0600 Subject: [PATCH] fix: drop --with-deps from postinstall to prevent hidden sudo prompt On Linux, Playwright's --with-deps flag runs sudo to install system packages. npm's spinner hides the password prompt, making the install appear to hang. Now installs without --with-deps and directs Linux users to run it manually if browser tools fail. Closes #67 Co-Authored-By: Claude Opus 4.6 --- scripts/postinstall.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/postinstall.js b/scripts/postinstall.js index d7eecaf0f..a06519ef8 100644 --- a/scripts/postinstall.js +++ b/scripts/postinstall.js @@ -44,10 +44,12 @@ try { } // Install Playwright chromium for browser tools (non-fatal) -const args = os.platform() === 'linux' ? '--with-deps' : '' try { - execSync(`npx playwright install chromium ${args}`, { stdio: 'inherit' }) + execSync('npx playwright install chromium', { stdio: 'inherit' }) process.stderr.write(`\n ${green}✓${reset} Browser tools ready\n\n`) } catch { - process.stderr.write(`\n ${yellow}⚠${reset} Browser tools unavailable — run ${cyan}npx playwright install chromium${reset} to enable\n\n`) + const hint = os.platform() === 'linux' + ? `${cyan}npx playwright install --with-deps chromium${reset}` + : `${cyan}npx playwright install chromium${reset}` + process.stderr.write(`\n ${yellow}⚠${reset} Browser tools unavailable — run ${hint} to enable\n\n`) }