File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ steps:
124124 - label : " :windows: install_windows_10_sdk Tests - Standard version file"
125125 command : |
126126 echo '20348' > .windows-10-sdk-version
127- bin/install_windows_10_sdk.ps1
127+ bin/install_windows_10_sdk.ps1 -DryRun
128128 agents :
129129 queue : windows
130130 notify :
@@ -134,7 +134,7 @@ steps:
134134 - label : " :windows: install_windows_10_sdk Tests - Version file with new lines"
135135 command : |
136136 echo "20348\n\n" > .windows-10-sdk-version
137- bin/install_windows_10_sdk.ps1
137+ bin/install_windows_10_sdk.ps1 -DryRun
138138 agents :
139139 queue : windows
140140 notify :
@@ -144,7 +144,7 @@ steps:
144144 - label : " :windows: install_windows_10_sdk Tests - Version file with a word"
145145 command : |
146146 echo "not an integer" > .windows-10-sdk-version
147- bin/install_windows_10_sdk.ps1
147+ bin/install_windows_10_sdk.ps1 -DryRun
148148 agents :
149149 queue : windows
150150 notify :
Original file line number Diff line number Diff line change 1+ param ( # parameters need to be defined at the top of the script
2+ [switch ]$DryRun = $false
3+ )
4+
15# Stop script execution when a non-terminating error occurs
26$ErrorActionPreference = " Stop"
37
@@ -27,6 +31,11 @@ if ($windows10SDKVersion -notmatch '^\d+$') {
2731
2832Write-Host " Will attempt to set up Windows 10 ($windows10SDKVersion ) SDK and Visual Studio Build Tools..."
2933
34+ if ($DryRun ) {
35+ Write-Output " Running in dry run mode, finishing here."
36+ exit 0
37+ }
38+
3039# Download the Visual Studio Build Tools Bootstrapper
3140Write-Output " ~~~ Downloading Visual Studio Build Tools..."
3241
You can’t perform that action at this time.
0 commit comments