Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

From source installation error #14

Open
azmasamy opened this issue Nov 29, 2022 · 8 comments
Open

From source installation error #14

azmasamy opened this issue Nov 29, 2022 · 8 comments

Comments

@azmasamy
Copy link

azmasamy commented Nov 29, 2022

I can't install the project

Here is a screenshot of the cargo and pnpm versions and the installation error:
image

@willcrichton
Copy link
Collaborator

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?

@azmasamy
Copy link
Author

bash

@willcrichton
Copy link
Collaborator

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.

@azmasamy
Copy link
Author

azmasamy commented Nov 29, 2022

Same error :/

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: NotFound, message: "program not found" }', test.rs:4:56

@willcrichton
Copy link
Collaborator

What is the output of which pnpm?

@willcrichton
Copy link
Collaborator

(Sorry for all the questions, I don't have a Windows machine, and I'm not sure how to solve this.)

@azmasamy
Copy link
Author

No worries, It's my job to provide enough info as an issue creator.

Here is the output of which pnpm :
image

@willcrichton
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants