Fix macOS CI: use workspace dir for Python toolcache instead of sudo
Set AGENT_TOOLSDIRECTORY to a workspace-local path so setup-python doesn't need /Users/runner or sudo access. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -32,9 +32,11 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Create Python toolcache directory (macOS)
|
||||
- name: Set up Python toolcache (macOS)
|
||||
if: matrix.platform == 'macos'
|
||||
run: sudo mkdir -p /Users/runner && sudo chown $USER /Users/runner
|
||||
run: |
|
||||
mkdir -p ${{ github.workspace }}/.toolcache
|
||||
echo "AGENT_TOOLSDIRECTORY=${{ github.workspace }}/.toolcache" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
|
||||
Reference in New Issue
Block a user