Skip to content

Commit

Permalink
Add ErrorAction to Win Dockerfiles. (#1919)
Browse files Browse the repository at this point in the history
b/309502154
  • Loading branch information
isarkis authored Nov 7, 2023
1 parent 4a1d1cc commit d24c2c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docker/windows/base/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
ARG FROM_IMAGE
FROM ${FROM_IMAGE}

SHELL ["powershell", "-ExecutionPolicy", "unrestricted", "-Command"]
SHELL ["powershell", "-ExecutionPolicy", "Unrestricted", "-Command", `
"$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

# Helper script for quick delete operations in windows
COPY ./fast-win-rmdir.cmd /fast-win-rmdir.cmd
Expand Down
3 changes: 2 additions & 1 deletion docker/windows/base/visualstudio2022/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ FROM ${FROM_IMAGE}
# Dockerfile for image used to install Visual Studio.
# WARNING: Changes to this file will result in an extremely long image rebuild.

SHELL ["powershell", "-ExecutionPolicy", "unrestricted", "-Command"]
SHELL ["powershell", "-ExecutionPolicy", "Unrestricted", "-Command", `
"$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

RUN mkdir C:\TEMP;`
Write-Host ('Downloading vs_buildtools.exe');`
Expand Down

0 comments on commit d24c2c2

Please sign in to comment.