about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-12-12 07:45:29 +0100
committerGitHub <noreply@github.com>2021-12-12 07:45:29 +0100
commitbe20570a07067e0c5fad37581f1287835cffda65 (patch)
treea6b497bcf1a80d308b337471609ebc748dacb39f
parent5dec0139f9452acbb3d5cd05ddfa54944f22a5c9 (diff)
parentb9ae04f088803d1df2b704aa5a3f5392ddf53cf6 (diff)
downloadrust-be20570a07067e0c5fad37581f1287835cffda65.tar.gz
rust-be20570a07067e0c5fad37581f1287835cffda65.zip
Rollup merge of #91811 - itzurabhi:boostrap-dist-wix-unwrap-issue, r=Mark-Simulacrum
bootstrap: Change unwrap() to expect() for WIX path

On Windows, `x.py dist` command panics without proper error message if `WIX` environment variable is not set. This patch changes `Option::unwrap()` to `Option::expect()`.
-rw-r--r--src/bootstrap/dist.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 5f28ffeda8f..dd179df3948 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -1564,7 +1564,9 @@ impl Step for Extended {
             builder.install(&etc.join("gfx/rust-logo.ico"), &exe, 0o644);
 
             // Generate msi installer
-            let wix = PathBuf::from(env::var_os("WIX").unwrap());
+            let wix_path = env::var_os("WIX")
+                .expect("`WIX` environment variable must be set for generating MSI installer(s).");
+            let wix = PathBuf::from(wix_path);
             let heat = wix.join("bin/heat.exe");
             let candle = wix.join("bin/candle.exe");
             let light = wix.join("bin/light.exe");