Skip to content

Commit 6392a16

Browse files
Rollup merge of #45830 - pornel:dosglobs, r=dtolnay
Warn about lack of args glob expansion in Windows shell Because all shells on Linux/macOS expand globs, and even MinGW on Windows emulates this behavior, it's easy to forget that Windows by itself doesn't support glob expansion. This PR documents this cross-platform difference.
2 parents 1db95a2 + 53de42e commit 6392a16

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libstd/env.rs

+4
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,10 @@ pub struct ArgsOs { inner: sys::args::Args }
671671
/// set to arbitrary text, and may not even exist. This means this property should
672672
/// not be relied upon for security purposes.
673673
///
674+
/// On Unix systems shell usually expands unquoted arguments with glob patterns
675+
/// (such as `*` and `?`). On Windows this is not done, and such arguments are
676+
/// passed as-is.
677+
///
674678
/// # Panics
675679
///
676680
/// The returned iterator will panic during iteration if any argument to the

0 commit comments

Comments
 (0)