snippy icon indicating copy to clipboard operation
snippy copied to clipboard

`bash` is not supported as shell type in azure.yaml hooks configuration

Open faynef opened this issue 1 year ago • 6 comments

Description: Running azd up in the Codespaces and Devcontainer environment failed with the following error: Image

After changing bash to sh in the hooks configuration of azure.yaml, a "permission denied" error occurred, as shown below: Image

Repro Steps:

  1. Open in Codespaces or Devcontainer.
  2. Run azd auth login --use-device-code.
  3. Run azd up.

Environment:

  • Azd version: azd version 1.15.1 (commit b8385e796d2a4b2e5b431ddf3fcc2069034d7ce3)
  • OS: Codespaces and Devcontainer

Expected behavior: azd up command can be successfully run on Codespaces and Devcontainer.

Suggestion:

  1. Update bash to sh in the hooks configuration of azure.yaml.
  2. Run the command sudo chmod +x ./scripts/generate-settings.sh to add permissions.

@thegovind and @hemarina for notification.

faynef avatar May 08 '25 09:05 faynef

fixed it in main. Please try again @faynef

thegovind avatar May 10 '25 05:05 thegovind

@thegovind Based on the latest main branch code test, this issue has not been fixed and can still be reproduced.

faynef avatar May 12 '25 07:05 faynef

@faynef - Could you please try again. I just fixed this

thegovind avatar May 16 '25 02:05 thegovind

@thegovind This issue can still be reproduced. The root cause is that the hooks configuration in azure.yaml does not support using bash as the shell type.

You can fix it by update bash to sh in the hooks configuration of azure.yaml.

Menghua1 avatar May 16 '25 09:05 Menghua1

@Menghua1 - this is now fixed. Could you please try it again

thegovind avatar May 19 '25 16:05 thegovind

@thegovind Yes, based on the latest code test, this issue has been fixed and cannot be reproduced.

Menghua1 avatar May 20 '25 03:05 Menghua1