From 15a3beb12da3bd29c1d9389ae4a478510eaa0c34 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Mon, 10 Sep 2018 14:35:02 -0700 Subject: [PATCH] Make sure MSI build works when not preview (#7752) The variable was set to empty (meaning to delete the variable) in the non-preview case and the build fails. The fix avoids setting the variable to empty --- assets/Product.wxs | 2 +- tools/packaging/packaging.psm1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/Product.wxs b/assets/Product.wxs index 803badc31c..e0899b9cc9 100644 --- a/assets/Product.wxs +++ b/assets/Product.wxs @@ -165,7 +165,7 @@ ADD_PATH=1 - + diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 4553e5744c..664d8b90ff 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -2521,14 +2521,14 @@ function New-MSIPackage [Environment]::SetEnvironmentVariable("ProductVersionWithName", $productVersionWithName, "Process") if (!$isPreview) { - [Environment]::SetEnvironmentVariable("PwshPath", '', "Process") + [Environment]::SetEnvironmentVariable("PwshPath", "[$productDirectoryName]", "Process") [Environment]::SetEnvironmentVariable("UpgradeCodeX64", '31ab5147-9a97-4452-8443-d9709f0516e1', "Process") [Environment]::SetEnvironmentVariable("UpgradeCodeX86", '1d00683b-0f84-4db8-a64f-2f98ad42fe06', "Process") [Environment]::SetEnvironmentVariable("IconPath", 'assets\Powershell_black.ico', "Process") } else { - [Environment]::SetEnvironmentVariable("PwshPath", 'preview', "Process") + [Environment]::SetEnvironmentVariable("PwshPath", "[$productDirectoryName]preview", "Process") [Environment]::SetEnvironmentVariable("UpgradeCodeX64", '39243d76-adaf-42b1-94fb-16ecf83237c8', "Process") [Environment]::SetEnvironmentVariable("UpgradeCodeX86", '86abcfbd-1ccc-4a88-b8b2-0facfde29094', "Process") [Environment]::SetEnvironmentVariable("IconPath", 'assets\Powershell_av_colors.ico', "Process")