Skip to content

Commit 430c236

Browse files
committed
Disable attachments when glm print flag used
1 parent 3f8411d commit 430c236

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

setup-glm.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ export ANTHROPIC_DEFAULT_HAIKU_MODEL="${ANTHROPIC_DEFAULT_HAIKU_MODEL:-glm,glm-4
210210
export ANTHROPIC_SMALL_FAST_MODEL="${ANTHROPIC_SMALL_FAST_MODEL:-glm,glm-4.5-air}"
211211
export CLAUDE_CODE_SUBAGENT_MODEL="${CLAUDE_CODE_SUBAGENT_MODEL:-glm,glm-4.7}"
212212
213+
# Avoid file watcher exhaustion in non-interactive mode.
214+
if [[ " $* " == *" -p "* || " $* " == *" --print "* ]]; then
215+
export CLAUDE_CODE_DISABLE_ATTACHMENTS=1
216+
fi
217+
213218
CLAUDE_BIN="$HOME/.claude/local/claude"
214219
if [[ ! -x "$CLAUDE_BIN" ]]; then
215220
CLAUDE_BIN="$(command -v claude || true)"
@@ -275,6 +280,11 @@ export ANTHROPIC_DEFAULT_HAIKU_MODEL="${ANTHROPIC_DEFAULT_HAIKU_MODEL:-glm-4.5-a
275280
export ANTHROPIC_SMALL_FAST_MODEL="${ANTHROPIC_SMALL_FAST_MODEL:-glm-4.5-air}"
276281
export CLAUDE_CODE_SUBAGENT_MODEL="${CLAUDE_CODE_SUBAGENT_MODEL:-glm-4.7}"
277282
283+
# Avoid file watcher exhaustion in non-interactive mode.
284+
if [[ " $* " == *" -p "* || " $* " == *" --print "* ]]; then
285+
export CLAUDE_CODE_DISABLE_ATTACHMENTS=1
286+
fi
287+
278288
CLAUDE_BIN="$HOME/.claude/local/claude"
279289
if [[ ! -x "$CLAUDE_BIN" ]]; then
280290
CLAUDE_BIN="$(command -v claude || true)"

0 commit comments

Comments
 (0)