claude-code: fix issue with DEV=true

When running in environments where DEV=true is set, claude would fail
with:

   TypeError: window.WebSocket is not a constructor
This commit is contained in:
zimbatm 2025-07-03 15:25:12 +02:00 committed by Austin Seipp
parent 5324092a43
commit 6ec4d5f023

View File

@ -28,9 +28,11 @@ buildNpmPackage rec {
# `claude-code` tries to auto-update by default, this disables that functionality.
# https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview#environment-variables
# The DEV=true env var causes claude to crash with `TypeError: window.WebSocket is not a constructor`
postInstall = ''
wrapProgram $out/bin/claude \
--set DISABLE_AUTOUPDATER 1
--set DISABLE_AUTOUPDATER 1 \
--unset DEV
'';
passthru.updateScript = ./update.sh;