File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ switch ((Get-WindowsImage -ImagePath $wimFilePath -Index $index).Architecture)
119119{
120120 0 { $architecture = " x86" }
121121 9 { $architecture = " amd64" }
122- 12 {$architecture = " arm64" }
122+ 12 { $architecture = " arm64" }
123123}
124124
125125if (Test-Path variable:architecture) {
@@ -444,19 +444,19 @@ if ($null -ne $WinSDKPath) {
444444}
445445$localOSCDIMGPath = " $PSScriptRoot \oscdimg.exe"
446446
447- if ((Test-Path variable:ADKDepTools) -and (Test-Path " $ADKDepTools \oscdimg.exe" - PathType leaf )) {
447+ if ((Test-Path variable:ADKDepTools) -and (Test-Path - Path " $ADKDepTools \oscdimg.exe" - PathType Leaf )) {
448448 Write-Host " Will be using oscdimg.exe from system ADK."
449449 $OSCDIMG = " $ADKDepTools \oscdimg.exe"
450450} else {
451451 Write-Host " oscdimg.exe from system ADK not found. Will be using bundled oscdimg.exe."
452452
453453 $url = " https://msdl.microsoft.com/download/symbols/oscdimg.exe/3D44737265000/oscdimg.exe"
454454
455- if (-not (Test-Path - Path $localOSCDIMGPath )) {
455+ if (-not (Test-Path - Path $localOSCDIMGPath - PathType Leaf )) {
456456 Write-Host " Downloading oscdimg.exe..."
457457 Invoke-WebRequest - Uri $url - OutFile $localOSCDIMGPath
458458
459- if (Test-Path $localOSCDIMGPath ) {
459+ if (Test-Path - Path $localOSCDIMGPath - PathType Leaf ) {
460460 Write-Host " oscdimg.exe downloaded successfully."
461461 } else {
462462 Write-Error " Failed to download oscdimg.exe."
You can’t perform that action at this time.
0 commit comments