You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cargo-generate version prints with a space between "cargo" and "generate". So the result of this get_cli_version function is ”generate“
$ cargo-generate -V
cargo generate 0.22.0
code in src/install/mod.rs
/// Fetches the version of a CLI toolpubfnget_cli_version(tool:&Tool,path:&Path) -> Result<String>{letmut cmd = Command::new(path);
cmd.arg("--version");let stdout = child::run_capture_stdout(cmd, tool)?;let version = stdout.trim().split_whitespace().nth(1);match version {Some(v) => Ok(v.to_string()),None => bail!("Something went wrong! We couldn't determine your version of the wasm-bindgen CLI. We were supposed to set that up for you, so it's likely not your fault! You should file an issue: https://github.com/rustwasm/wasm-pack/issues/new?template=bug_report.md.")}}
Knight-wh
changed the title
When using wasm-pack new, the version of the installed cargo-generate that is being checked has an error
error: when using wasm-pack new, the version of the installed cargo-generate that is being checked is wrong
Dec 15, 2024
🐛 Bug description
The cargo-generate version prints with a space between "cargo" and "generate". So the result of this
get_cli_version
function is ”generate“code in src/install/mod.rs
🤔 Expected Behavior
👟 Steps to reproduce
$ RUST_LOG=info wasm-pack new myproject --template https://github.com/rustwasm/wasm-pack-template [INFO wasm_pack::install] Checking installed `cargo-generate` version == expected version: generate == 0.22.0 [INFO]: ⬇️ Installing cargo-generate...
🌍 Your environment
Include the relevant details of your environment.
wasm-pack version: 0.13.1
rustc version: 1.81.0
The text was updated successfully, but these errors were encountered: