Codespace Fails to Recognize Execute Permission for Shell Scripts #72723
Replies: 2 comments
-
|
Check if the file system in the GitHub Codespace supports the execution of shell scripts. It's possible that there are restrictions on the file system that prevent the recognition of execute permissions? Also, have you considered using Git hooks instead to automatically set execute permissions when the script is committed. You can create a pre-commit or post-commit hook that runs the necessary git add --chmod=+x command for your script. This way, you won't have to manually set execute permissions each time. |
Beta Was this translation helpful? Give feedback.
-
|
I had the same thing. I added an explicit |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Bug
Body
I’m encountering an issue where GitHub Codespaces is not recognizing the execute permission for shell scripts in my repository.
For instance, when I create a script named xyz.sh in my repository and attempt to commit it using the following git command:
git update-index --chmod=+x .github/scripts/xyz.shand then commit with:
git commit -m "add execute permission to xyz.sh"The execute permission is not recognized by Codespaces. However, when I perform the same actions after cloning the repository locally, everything works as expected.
I’ve also tried the following command in Codespace:
git add --chmod=+x .github/scripts/xyz.shThis command works, but only temporarily. I have to execute this command every time I make changes to xyz.sh, which is not ideal.
Any assistance with this issue would be greatly appreciated. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions