-
Notifications
You must be signed in to change notification settings - Fork 7
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
Program not working under Windows #5
Comments
Hi! |
Unfortunally, I'm not a rust-guy, so I could not solve this by myself..... Thank you for your response! |
I think this would help:
Particularly use std::process::Command;
let output = if cfg!(target_os = "windows") {
Command::new("cmd")
.args(["/C", "echo hello"])
.output()
.expect("failed to execute process")
} else {
Command::new("sh")
.arg("-c")
.arg("echo hello")
.output()
.expect("failed to execute process")
};
let hello = output.stdout; |
This has been resolved by @exsjabe in #10. Thanks to him! |
I've tested several variations, e.g.
but no output is produced. Maybe because you call sh instead of env(COMSPEC)?
The text was updated successfully, but these errors were encountered: