Skip to content

fix(ci): deploy-secure aws: command not found on macOS runners#680

Closed
an0mium wants to merge 1 commit into
mainfrom
codex/claude-20260305-070153-6cf1bbf3
Closed

fix(ci): deploy-secure aws: command not found on macOS runners#680
an0mium wants to merge 1 commit into
mainfrom
codex/claude-20260305-070153-6cf1bbf3

Conversation

@an0mium

@an0mium an0mium commented Mar 6, 2026

Copy link
Copy Markdown
Collaborator

Problem

All 5 recent deploy-secure.yml runs fail at Get staging instance IDs with:

aws: command not found (exit 127)

The previous fix (PR #657) added a Fix AWS CLI path step that correctly handles the case where /usr/local/bin/aws exists — but the else branch only runs pip3 install awscli --quiet without updating $GITHUB_PATH. So aws lands in pip's scripts directory (e.g. ~/Library/Python/3.x/bin/ on the macOS Hetzner runner) which is never added to PATH.

Fix

Updated all three Fix AWS CLI path steps (staging, production, DR):

  1. Check /usr/local/bin/aws → add to GITHUB_PATH (existing)
  2. Check /opt/homebrew/bin/aws → add to GITHUB_PATH (new: macOS Homebrew)
  3. command -v aws → already in PATH, no-op (new: short-circuit)
  4. Else: pip3 install awscli --quiet + resolve scripts dir via sysconfig.get_path('scripts') → add to GITHUB_PATH (bug fix: was missing the PATH update)

Test plan

  • Push to main triggers deploy-secure.yml and Get staging instance IDs step passes
  • All three runner paths (staging/production/DR) no longer fail with exit 127

🤖 Generated with Claude Code

…ecure

When /usr/local/bin/aws is absent and pip3 installs awscli, the binary
lands in pip's scripts directory (e.g. sysconfig.get_path('scripts')),
which is not in PATH. The next step then fails with 'aws: command not
found' (exit 127).

Fix: after pip3 install, resolve the scripts dir via sysconfig and
append it to GITHUB_PATH. Also add /opt/homebrew/bin check for macOS
Homebrew installs, and short-circuit if aws is already in PATH.

Applies to all three Fix AWS CLI path steps (staging, production, DR).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@an0mium an0mium enabled auto-merge (squash) March 6, 2026 08:02
@an0mium

an0mium commented Mar 6, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by current main. The branch is stale, remains DIRTY against main, and its remaining net diff would overwrite the newer deploy-secure fix already landed on main (currently at bb2e577 and later). Closing to avoid reintroducing regressions.

@an0mium an0mium closed this Mar 6, 2026
auto-merge was automatically disabled March 6, 2026 08:25

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants