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(); } }