Azure-Samples / Azure-Samples/azure-appconfig-aks
`azd provision` step fails on Linux due to non-executable `infra/hooks/predeploy.sh` file
- Dominant language
- Bicep
- Stars
- 2
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
The predeploy hook fails with error on Linux:
```sh
ERROR: error executing step command 'deploy --all': failed running pre hooks: 'predeploy' hook failed with exit code: '126', Path: 'infra/hooks/predeploy.sh'. : exit code: 126, stdout: , stderr: /bin/sh: 1: infra/hooks/predeploy.sh: Permission denied
```
The Bash shell script is missing executable permissions:
```
ls -al infra/hooks/
total 16
drwxr-xr-x 2 4096 Aug 16 08:13 .
drwxr-xr-x 5 4096 Aug 16 08:35 ..
-rw-r--r-- 1 855 Aug 16 08:13 predeploy.ps1
-rw-r--r-- 1 844 Aug 16 08:13 predeploy.sh
```
Fix:
```sh
chmod +x infra/hooks/predeploy.sh
```
Contributor guide
Research direction
Inspect infra/hooks/predeploy.sh and its tracked file permissions, then run azd provision on Linux to reproduce the exit-126 failure. Done means the hook is executable in the repository and the predeploy step completes without a permission-denied error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, shell
- Domain
- cloud, devops
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100