noclobber breaks JetBrains IDEs’ ability to read your shell environment
RustRover recently began warning me that it failed to load my shell environment at startup. On examining its logs, I noticed these lines:
2025-12-09 09:57:26,747 [ 341] INFO - #c.i.u.ShellEnvironmentReader - stdout/stderr: (eval):1: can't change option: zle
zsh:1: file exists: /var/folders/j5/kn67v_h92351bp5grcmgj5q80000gn/T/ij-shell-env-data.8681127703265547596.tmpThe first line, we can ignore (determined experimentally). The second line is our issue. It appears that the IDE has created this file already and expects the shell to overwrite it. Unfortunately this is prevented by my zsh configuration, which includes setopt noclobber.
To fix this, we can skip setopt noclobber if the shell is being loaded by a JetBrains IDE for the purpose of loading the environment:
if [ -z "$INTELLIJ_ENVIRONMENT_READER" ]; then
setopt noclobber
fi