Skip to content

Commit 53b1d6d

Browse files
committed
Add env option SKIP_VERSION_CHECK forcing wasm-pack to use what's there
This is especially useful within distro build environments
1 parent 32e52ca commit 53b1d6d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/install/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ pub fn download_prebuilt_or_cargo_install(
6565
// `cargo install`, for example.
6666
if let Ok(path) = which(tool.to_string()) {
6767
debug!("found global {} binary at: {}", tool, path.display());
68-
if check_version(&tool, &path, version)? {
68+
if check_version(&tool, &path, version)?
69+
|| env::var("SKIP_VERSION_CHECK").map_or(false, |v| v == "1")
70+
{
6971
let download = Download::at(path.parent().unwrap());
7072
return Ok(Status::Found(download));
7173
}

0 commit comments

Comments
 (0)