File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ function New-LiveTestResourceGroup {
143
143
[string ] $Location = " westus"
144
144
)
145
145
146
- $rg = Invoke-LiveTestCommand - Command " New-AzResourceGroup -Name $Name -Location $Location "
146
+ $rg = Invoke-LiveTestCommand - Command " New-AzResourceGroup -Name $Name -Location $Location -Force "
147
147
$rg
148
148
}
149
149
@@ -188,12 +188,7 @@ function Invoke-LiveTestCommand {
188
188
189
189
$cmdResult = Invoke-Expression - Command $Command - ErrorAction Stop
190
190
191
- if ($LASTEXITCODE -eq 0 ) {
192
- Write-Host " ##[section]Successfully executed the command `" $Command `" " - ForegroundColor Green
193
- }
194
- else {
195
- throw " Error occurred when executing the command `" $Command `" ."
196
- }
191
+ Write-Host " ##[section]Successfully executed the command `" $Command `" " - ForegroundColor Green
197
192
198
193
$cmdResult
199
194
break
You can’t perform that action at this time.
0 commit comments