Skip to content

Commit ab0110d

Browse files
committed
C-BUILDER: Avoid GNUism in example
Accepting options after a non-option argument is a glibc extension[1]. Move the option before the non-option to be POSIX compliant. [1]: https://www.gnu.org/software/libc/manual/html_node/Using-Getopt.html#index-getopt
1 parent 8486acc commit ab0110d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/type-safety.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,10 @@ Command::new("/bin/cat").arg("file.txt").spawn();
230230

231231
// Complex configuration
232232
let mut cmd = Command::new("/bin/ls");
233-
cmd.arg(".");
234233
if size_sorted {
235234
cmd.arg("-S");
236235
}
236+
cmd.arg(".");
237237
cmd.spawn();
238238
```
239239

0 commit comments

Comments
 (0)