-
Notifications
You must be signed in to change notification settings - Fork 476
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
There is no documentation on what "executing a recipe as a script" means #1410
Comments
Having just looked a bit further, I found Shebang Recipe Execution on Windows. I'm not clear precisely what this is saying, but I think that it implies that the process is something like the following:
This appears to explain most of the weird behaviour I've been seeing. The one case I'm not able to explain is if I have a shebang of
I get the error:
I can't tell if that error is coming from I'm particularly confused about what is constructing the path Interestingly, I get the same error if I try to run I have a recollection of having had a similar discussion preiously, but I can't find any record of it on the tracker 🙁 |
Ah, I found the old discussion, it's #650. But while that discussion is about By the way, I apologise for the way I keep finding more information after posting my questions. I genuinely did try to research before posting - just not hard enough, it seems 🙁 Footnotes
|
Actually, it looks like the issue might be std::process::Command. The following test program gives the same error: use std::process::Command;
fn main() {
let mut c = Command::new("py");
c.arg("-V");
println!("Command: {:#?}", c);
let s = c.status();
println!("Status: {:#?}", s);
} It looks like there are various issues around this - rust-lang/rust#37519 is the first one I found, but that links to rust-lang/rust#87704 with a note that the original code was "replaced as a side effect" of that issue. I've submitted rust-lang/rust#104358 with the problem, but I think (assuming it doesn't get fixed relatively quickly) the just documentation should include some advice about the issue - whether this is "always include the Footnotes
|
Thanks for digging into this! Executing shebang recipes is inconsistent between OSes, because Unix-like OSes parse shebang lines differently, and Windows doesn't support them at all, so |
In Writing Recipes in Other Languages, the documentation says
But it's not explained what "executing a recipe as a script" actually means. On Windows, if I have
I'm not at all clear what I should expect would happen with a recipe starting with
#!
. It would be great if this could be documented.The text was updated successfully, but these errors were encountered: