Skip to content

Commit a67f82b

Browse files
stevapplecompnerd
authored andcommitted
[build.ps1] Fix newer PS Core compatibility
In Powershell Core, `$_` from `Get-ChildItem` output will be interpreted as full path. Use `$($_.Name)` to ensure only base file name is used.
1 parent cb724f8 commit a67f82b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ function Fetch-Dependencies {
713713
Get-ChildItem "$BinaryCache\toolchains\WixAttachedContainer" -Filter "*.msi" | ForEach-Object {
714714
$LogFile = [System.IO.Path]::ChangeExtension($_.Name, "log")
715715
$TARGETDIR = if ($_.Name -eq "rtl.msi") { "$BinaryCache\toolchains\$ToolchainName\LocalApp\Programs\Swift\Runtimes\$(Get-PinnedToolchainVersion)\usr\bin" } else { "$BinaryCache\toolchains\$ToolchainName" }
716-
Invoke-Program -OutNull msiexec.exe /lvx! $BinaryCache\toolchains\$LogFile /qn /a $BinaryCache\toolchains\WixAttachedContainer\$_ ALLUSERS=0 TARGETDIR=$TARGETDIR
716+
Invoke-Program -OutNull msiexec.exe /lvx! $BinaryCache\toolchains\$LogFile /qn /a $BinaryCache\toolchains\WixAttachedContainer\$($_.Name) ALLUSERS=0 TARGETDIR=$TARGETDIR
717717
}
718718
}
719719

0 commit comments

Comments
 (0)