mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Guard Remove-Item in Create-MSIPackage
This commit is contained in:
1 parent
691618d335
commit
c5a81c2e6e
1 file changed
+2
-2
+2
-2
@@ -1002,14 +1002,14 @@ function Create-MSIPackage
|
||||
$wixObjFragmentPath = (Join-path $env:Temp "Fragment.wixobj")
|
||||
|
||||
$msiLocationPath = Join-Path $pwd "$productVersionWithName.msi"
|
||||
del $msiLocationPath -Force
|
||||
Remove-Item -ErrorAction SilentlyContinue $msiLocationPath -Force
|
||||
|
||||
& $wixHeatExePath dir $ProductSourcePath -dr $productVersionWithName -cg $productVersionWithName -gg -sfrag -srd -scom -sreg -out $wixFragmentPath -var env.ProductSourcePath -v
|
||||
& $wixCandleExePath "$ProductWxsPath" "$wixFragmentPath" -out (Join-Path "$env:Temp" "\\") -arch x64 -v
|
||||
& $wixLightExePath -out "$productVersionWithName.msi" $wixObjProductPath $wixObjFragmentPath -ext WixUIExtension -v
|
||||
|
||||
Remove-Item -ErrorAction SilentlyContinue *.wixpdb -Force
|
||||
|
||||
del *.wixpdb -Force
|
||||
Write-Verbose "You can find the MSI @ $msiLocationPath"
|
||||
return $msiLocationPath
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user