Skip to content

Commit

Permalink
Install wapm via cargo if not available (Windows)
Browse files Browse the repository at this point in the history
  • Loading branch information
fschutt committed Nov 24, 2022
1 parent cded3ac commit 75aeeda
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/integration/cli/tests/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,31 @@ fn test_wapm_run_works() -> anyhow::Result<()> {
return Ok(());
}

if Command::new("wapm").arg("--version").output().is_err()
|| !Command::new("wapm")
.arg("--version")
.output()
.unwrap()
.status
.success()
{
let _ = Command::new("cargo")
.arg("install")
.arg("wapm-cli")
.output();
}

if Command::new("wapm").arg("--version").output().is_err()
|| !Command::new("wapm")
.arg("--version")
.output()
.unwrap()
.status
.success()
{
println!("warning: wapm is not installed even after running cargo install wapm-cli");
}

let temp_dir = tempfile::tempdir()?;
let path = temp_dir.path();
let output = Command::new("wapm")
Expand Down

0 comments on commit 75aeeda

Please sign in to comment.