Commit ca63a4e
committed
Auto merge of rust-lang#53404 - oconnor663:current_dir_behavior, r=alexcrichton
document the platform-specific behavior of Command::current_dir
See also rust-lang#37868.
Here's my initial wording:
> Note that if the program path is relative (e.g. `"./script.sh"`), the interaction between that path and `current_dir` varies across platforms. Windows currently ignores `current_dir` when locating the program, but Unix-like systems interpret the program path relative to `current_dir`. These implementation details aren't considered stable, and it's recommended to call `canonicalize` to get an absolute program path instead of using relative paths and `current_dir` together.
I'd like to get feedback on:
- _Should_ we consider those details stable? It might be disruptive to change them, regardless of what I can get away with claiming in docs :)
- Is `canonicalize` an appropriate recommendation? As discussed in rust-lang#37868 above, there are reasons it's not called automatically in the `Command` implementation.1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
629 | 637 | | |
630 | 638 | | |
631 | 639 | | |
| |||
638 | 646 | | |
639 | 647 | | |
640 | 648 | | |
| 649 | + | |
| 650 | + | |
641 | 651 | | |
642 | 652 | | |
643 | 653 | | |
| |||
0 commit comments