docker-tools
docker-tools copied to clipboard
Execution of PowerShell hook scripts do not fail build command on error
When executing a PowerShell-based pre-build or post-build hook script and that script fails, it won't cause a non-zero exit code and not cause the build command to throw an exception. The build will incorrectly continue execution.
Relevant code:
https://github.com/dotnet/docker-tools/blob/2dddfe26ef6faca5f110fe1f6c179e47a51f3433/src/Microsoft.DotNet.ImageBuilder/src/Commands/BuildCommand.cs#L580-L609
This is an example of this issue: https://github.com/dotnet/dotnet-buildtools-prereqs-docker/pull/523