pub fn path_with(dir: &Path) -> Option<OsString>Expand description
dir placed on the PATH this process has, so a script is a command — last.
None when there is no PATH to put it on, or the result could not be written down as one
(a : inside dir). A process with no PATH finds commands in a system default that
naming only the scripts directory would replace, so leaving it alone is the safe answer.
Last, not first (#427). write_file is Allow and shell runs with this PATH, so a
script named git used to run in place of the real git under every later shell call —
including a call the person approved by name, which is the one case where they thought they
knew what would run. A script now wins only where no command exists; to run one that shares a
name with a real command, name it by path (scripts/git) or add a distinct name.