Commit 6ec4d5f0 authored by zimbatm's avatar zimbatm Committed by Austin Seipp
Browse files

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
parent 5324092a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;