Skip to content

Commit 70dba37

Browse files
Merge pull request #550 from rustwasm/install-1
fix(exe): wasm-pack-init (1).exe should work
2 parents 0f331e0 + f26ccc0 commit 70dba37

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ fn run() -> Result<(), failure::Error> {
3535
if let Ok(me) = env::current_exe() {
3636
// If we're actually running as the installer then execute our
3737
// self-installation, otherwise just continue as usual.
38-
if me.file_stem().and_then(|s| s.to_str()) == Some("wasm-pack-init") {
38+
if me
39+
.file_stem()
40+
.and_then(|s| s.to_str())
41+
.expect("executable should have a filename")
42+
.starts_with("wasm-pack-init")
43+
{
3944
installer::install();
4045
}
4146
}

0 commit comments

Comments
 (0)