Output from azd version
azd version 1.23.15 (commit cfdc182) (stable)
Describe the bug
I have a prepackage hook on a service that fails to execute with version 1.23.15 of azd. See this failed workflow: https://github.com/ronaldbosma/track-availability-in-app-insights/actions/runs/24284688051/job/70912023507
Here's the error when running azd package:
ERROR: failed packaging service 'logicApp': failed invoking event handlers for 'prepackage', failed running scripts for hooks 'package', hook configuration for 'prepackage' is invalid, hook script path "../../hooks/prepackage-logicapp-build-functions-project.ps1" escapes project root "/home/runner/work/track-availability-in-app-insights/track-availability-in-app-insights/src/logicApp" Error: Process completed with exit code 1.
When I pin the azd version to 1.23.14 in the Azure/setup-azd@v2 task, the hook succeeds. See https://github.com/ronaldbosma/track-availability-in-app-insights/actions/runs/24284969050/job/70912716727
To Reproduce
This is my folder structure:
├── hooks [ AZD hooks ]
├── infra [ Infrastructure As Code files ]
└── src [ Application code ]
├── functionApp [ Azure Functions ]
└── logicApp [ Logic App workflows ]
I've created a prepackage hook for the logicApp service, but it's placed in the hooks folder at the root of my repo. Looking at the error, that seems to be causing the issue.
Expected behavior
I would expect version 1.23.15 to behave the same as 1.23.14 and execute the hook.
Environment
Information on your environment:
* Bicep CLI version 0.42.1 (caea9302e8)
* GitHub Actions Workflow
Additional context
Output from
azd versionazd version 1.23.15 (commit cfdc182) (stable)
Describe the bug
I have a prepackage hook on a service that fails to execute with version 1.23.15 of azd. See this failed workflow: https://github.com/ronaldbosma/track-availability-in-app-insights/actions/runs/24284688051/job/70912023507
Here's the error when running
azd package:ERROR: failed packaging service 'logicApp': failed invoking event handlers for 'prepackage', failed running scripts for hooks 'package', hook configuration for 'prepackage' is invalid, hook script path "../../hooks/prepackage-logicapp-build-functions-project.ps1" escapes project root "/home/runner/work/track-availability-in-app-insights/track-availability-in-app-insights/src/logicApp" Error: Process completed with exit code 1.When I pin the azd version to
1.23.14in theAzure/setup-azd@v2task, the hook succeeds. See https://github.com/ronaldbosma/track-availability-in-app-insights/actions/runs/24284969050/job/70912716727To Reproduce
This is my folder structure:
I've created a prepackage hook for the logicApp service, but it's placed in the hooks folder at the root of my repo. Looking at the error, that seems to be causing the issue.
Expected behavior
I would expect version
1.23.15to behave the same as1.23.14and execute the hook.Environment
Information on your environment:
* Bicep CLI version 0.42.1 (caea9302e8)
* GitHub Actions Workflow
Additional context