-
Notifications
You must be signed in to change notification settings - Fork 50
fix: ensure /home/runner/.copilot directory has correct ownership before Copilot CLI install #13980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1696e2f
e9dac20
2b9ea86
412b1ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,16 @@ VERSION="${1:-}" | |
| INSTALLER_URL="https://raw.githubusercontent.com/github/copilot-cli/main/install.sh" | ||
| INSTALLER_TEMP="/tmp/copilot-install.sh" | ||
| MAX_ATTEMPTS=3 | ||
| COPILOT_DIR="/home/runner/.copilot" | ||
|
|
||
| # Fix directory ownership before installation | ||
| # This is needed because a previous AWF run on the same runner may have used | ||
| # `sudo -E awf --enable-chroot ...`, which creates the .copilot directory with | ||
| # root ownership. The Copilot CLI (running as the runner user) then fails when | ||
| # trying to create subdirectories. See: https://github.com/github/gh-aw/issues/12066 | ||
| echo "Ensuring correct ownership of $COPILOT_DIR..." | ||
| mkdir -p "$COPILOT_DIR" | ||
| sudo chown -R runner:runner "$COPILOT_DIR" | ||
|
Comment on lines
+24
to
+33
|
||
|
|
||
| # Function to download installer with retry logic | ||
| download_installer_with_retry() { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue reference in the comment points to
https://github.com/github/gh-aw/issues/12066, but according to the PR description, this fix is for issue #13979. The comment should be updated to reference the correct issue number.