Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions shell/.zprofile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
if [ -r "/opt/homebrew/bin/brew" ]; then
eval $(/opt/homebrew/bin/brew shellenv)
fi

# Ensure a writable temp dir. Headless / launchd-launched contexts inherit the
# root-owned macOS fallback (TMPDIR=/var/folders/zz/.../T, mode 0700), which is
# unwritable by the user and breaks vitest/npm/esbuild with EACCES. Only override
# when TMPDIR is unset or not writable, so interactive machines keep system temp.
if [ -z "$TMPDIR" ] || [ ! -w "${TMPDIR%/}" ]; then
export TMPDIR="$HOME/.claude/tmp"
export TMP="$TMPDIR"
export TEMP="$TMPDIR"
mkdir -p "$TMPDIR"
fi

if [[ $- == *i* ]] && [ -t 0 ]; then
echo "This is an interactive shell"
else
Expand Down
Loading