Skip to content

Cloning repo and azd up fails on MacOS #5

@Jandev

Description

@Jandev

When running azd up on my Mac the command fails with the following error:

ERROR: error executing step command 'provision': failed running pre hooks: failed running scripts for hooks 'azd provision', hook configuration for 'preprovision' is invalid, run is always required

It looks like this is caused by only having Windows steps defined in the different hooks. Adding posix to the configuration helps (for me).
I haven't tested this throroughly so not creating a PR at this point, but someone with the time and knowledge might take the below excerpt for input.

hooks:
  # Phase 1: Create Entra app, generate config files
  preprovision:
    windows:
      shell: pwsh
      run: ./deployment/hooks/preprovision.ps1
      continueOnError: false
    posix:
      shell: pwsh
      run: ./deployment/hooks/preprovision.ps1
      continueOnError: false

  # Phase 2: Provision (automatic - Bicep templates with placeholder image)

  # Phase 3: Build real image and deploy to Container App (runs after provision)
  postprovision:
    windows:
      shell: pwsh
      run: ./deployment/hooks/postprovision.ps1
      continueOnError: false
    posix:
      shell: pwsh
      run: ./deployment/hooks/postprovision.ps1
      continueOnError: false

  # Cleanup Entra app and config files
  postdown:
    windows:
      shell: pwsh
      run: ./deployment/hooks/postdown.ps1
      continueOnError: false
    posix:
      shell: pwsh
      run: ./deployment/hooks/postdown.ps1
      continueOnError: false

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions