-
Notifications
You must be signed in to change notification settings - Fork 34
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
document the interaction between stdout
and dir
#47
Comments
That's expected. As much as possible, I've tried to avoid letting One of the big reasons I wanted to make things work this way, is that I imagine a function like this: fn redirect_some_expression_to_foo(e: Expression) -> Expression {
e.stdout("./foo.txt")
} I think this function should be valid. But note that if However, no matter how hard we try, there's going to be some inconsistency. For example, if you say |
We've also avoided setting the global cwd, because there's no way to lock it, and so it's not thread safe. (I'm not sure if that's actually what you were suggesting, but other subprocess libraries totally do this, and I'm not a fan of it.) I should document this (non) behavior too. |
stdout
method ignores preceding dir
methodstdout
and dir
cmd!("echo", "foo").dir("bar").stdout("blub.txt").run().unwrap()
creates a fileblub.txt
in the current directory instead of inside thebar
directory.Is this expected? I thought
dir
behaved like astd::env::set_current_directory
before and after the call.Either way, I think it should be at least documented.
The text was updated successfully, but these errors were encountered: