From f26ccc0f3a873b0db76b6a75edbc7a08e99c1ecd Mon Sep 17 00:00:00 2001 From: Ashley Williams Date: Fri, 22 Feb 2019 11:42:41 -0600 Subject: [PATCH] fix(exe): wasm-pack-init (1).exe should work --- src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 26698a2..c99f5af 100644 --- a/src/main.rs +++ b/src/main.rs @@ -35,7 +35,12 @@ fn run() -> Result<(), failure::Error> { if let Ok(me) = env::current_exe() { // If we're actually running as the installer then execute our // self-installation, otherwise just continue as usual. - if me.file_stem().and_then(|s| s.to_str()) == Some("wasm-pack-init") { + if me + .file_stem() + .and_then(|s| s.to_str()) + .expect("executable should have a filename") + .starts_with("wasm-pack-init") + { installer::install(); } }