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 <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson 2026-03-11 17:18:25 -06:00
parent a21022a3ef
commit 1c5edbd309

View file

@ -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`)
}