Open azmasamy opened 1 year ago
Weird... I would assume that Command::new("pnpm")
would use the PATH of the process, which is inherited from Cargo.
What shell are you running? Is this bash in WSL?
bash
Can you try running this in a standalone script and see if it works? i.e. make a file test.rs
with these contents:
use std::process::Command;
fn main(){
let result = Command::new("pnpm").arg("-v").output().unwrap();
println!("{}", String::from_utf8(result.stdout).unwrap());
}
Then run rustc test.rs && ./test
and see if you get an error.
Same error :/
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: NotFound, message: "program not found" }', test.rs:4:56
What is the output of which pnpm
?
(Sorry for all the questions, I don't have a Windows machine, and I'm not sure how to solve this.)
No worries, It's my job to provide enough info as an issue creator.
Here is the output of which pnpm
:
Try running this script instead?
use std::process::Command;
fn main(){
let result = Command::new("cmd").args(&["/C", "pnpm", "-v"]).output().unwrap();
println!("{}", String::from_utf8(result.stdout).unwrap());
}
I can't install the project
Here is a screenshot of the cargo and pnpm versions and the installation error: