You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: text/3502-cargo-script.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -435,7 +435,9 @@ users might not be aware that they are using old dependencies.
435
435
The precedence schema for `cargo foo` has limitations
436
436
- If your script has the same name as a built-in subcommand, then you have to prefix it with `./`
437
437
- If you browse a random repo and try to run one of your aliases or third-party commands, you could unintentionally get a local script instead.
438
+
- Similarly, new cargo commands could shadow user scripts
438
439
- If `PATH` is unset or set to an empty string, then running `build` will run `cargo build` and run the built-in `build` command rather than your script
440
+
- The likelihood of a script named the same as a cargo subcommand that is in the PATH or called in a strange way seems unlikely
439
441
- Calls to `execve` (and similar functions) don't rely on resolving via `PATH` so a call with `build` will run `cargo build` and run the built-in `build` command rather than your script
440
442
441
443
This increases the maintenance and support burden for the cargo team, a team
@@ -948,7 +950,7 @@ See also [Single-file scripts that download their dependencies](https://dbohdan.
948
950
# Unresolved questions
949
951
[unresolved-questions]: #unresolved-questions
950
952
951
-
-Whether `version` should may be unset or defaulted to `0.0.0`
953
+
-Considering taking [AT_EXECFN](https://www.man7.org/linux/man-pages/man3/getauxval.3.html) into account when determining precedence
0 commit comments