Skip to content

Commit b9ae04f

Browse files
authored
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()`.
1 parent b8dc6aa commit b9ae04f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/bootstrap/dist.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,9 @@ impl Step for Extended {
15641564
builder.install(&etc.join("gfx/rust-logo.ico"), &exe, 0o644);
15651565

15661566
// Generate msi installer
1567-
let wix = PathBuf::from(env::var_os("WIX").unwrap());
1567+
let wix_path = env::var_os("WIX")
1568+
.expect("`WIX` environment variable must be set for generating MSI installer(s).");
1569+
let wix = PathBuf::from(wix_path);
15681570
let heat = wix.join("bin/heat.exe");
15691571
let candle = wix.join("bin/candle.exe");
15701572
let light = wix.join("bin/light.exe");

0 commit comments

Comments
 (0)