Skip to content

Commit 3610819

Browse files
committed
iso path check
1 parent 52ffc03 commit 3610819

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

CanaryValidator/Canary.Tests.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ param (
2828
[parameter(HelpMessage="Local path where the windows ISO is stored")]
2929
[Parameter(ParameterSetName="default", Mandatory=$true)]
3030
[Parameter(ParameterSetName="tenant", Mandatory=$true)]
31+
[ValidateScript({Test-Path -Path $_})]
3132
[ValidateNotNullOrEmpty()]
3233
[string]$WindowsISOPath,
3334
[parameter(HelpMessage="Fully qualified domain name of the azure stack environment. Ex: contoso.com")]
@@ -150,7 +151,7 @@ while ($runCount -le $NumberOfIterations)
150151
}
151152
}
152153

153-
if (Test-Path -Path $WindowsISOPath -ErrorAction SilentlyContinue)
154+
if ($WindowsISOPath)
154155
{
155156
Invoke-Usecase -Name 'UploadWindows2016ImageToPIR' -Description "Uploads a windows server 2016 image to the PIR" -UsecaseBlock `
156157
{

0 commit comments

Comments
 (0)