mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 14:24:13 +08:00
fix: prevent orphaned installer processes from blocking retries (#790)
* fix: prevent orphaned installer processes from blocking retries When the `timeout` command expires during Claude Code installation, it only kills the direct child bash process, not the grandchild installer processes. These orphaned processes continue holding a lock file, causing retry attempts to fail with "another process is currently installing Claude". Add `--foreground` flag to run the command in a foreground process group so all child processes are killed on timeout. Add `--kill-after=10` to send SIGKILL if SIGTERM doesn't terminate processes within 10 seconds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: apply same timeout fix to root action.yml 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -129,7 +129,8 @@ runs:
|
||||
for attempt in 1 2 3; do
|
||||
echo "Installation attempt $attempt..."
|
||||
if command -v timeout &> /dev/null; then
|
||||
timeout 120 bash -c "curl -fsSL https://claude.ai/install.sh | bash -s -- $CLAUDE_CODE_VERSION" && break
|
||||
# Use --foreground to kill entire process group on timeout, --kill-after to send SIGKILL if SIGTERM fails
|
||||
timeout --foreground --kill-after=10 120 bash -c "curl -fsSL https://claude.ai/install.sh | bash -s -- $CLAUDE_CODE_VERSION" && break
|
||||
else
|
||||
curl -fsSL https://claude.ai/install.sh | bash -s -- "$CLAUDE_CODE_VERSION" && break
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user