Verification
Problem
On a system without local, it would continue searching in $PATH. If a such a command were found, that would wrongly be used throughout.
Steps
- Login to where
/bin/sh has no builtin local
- Create an executable
local in $PATH
Possible Solution(s)
I don’t know how portable an empty path is, nor whether prepending it will affect searching for the following command on such a Shell. This should probably work anywhere:
has_local() {
# shellcheck disable=SC2034 # deliberately unused
PATH= local _has_local
}
Notes
No response
Rustup version
Reading latest script on GitHub.
Installed toolchains
Irrelevant, since I don’t have a Shell with no builtin `local`
OS version
Irrelevant, since I don’t have a Shell with no builtin `local`
Verification
Problem
On a system without
local, it would continue searching in$PATH. If a such a command were found, that would wrongly be used throughout.Steps
/bin/shhas no builtinlocallocalin$PATHPossible Solution(s)
I don’t know how portable an empty path is, nor whether prepending it will affect searching for the following command on such a Shell. This should probably work anywhere:
Notes
No response
Rustup version
Reading latest script on GitHub.Installed toolchains
Irrelevant, since I don’t have a Shell with no builtin `local`OS version
Irrelevant, since I don’t have a Shell with no builtin `local`