Fix ./bin being in $PATH

Ensures the installer does not pick a local path to
the git executable

Could happen if one has `export PATH='./bin:$PATH` in the shell rc file
then it would set USABLE_GIT to be `./bin/git`
which later fails when another cd was executed

So `command -v git` migth spit out `./bin/git`
but then `readlink -f` turns it into `/usr/bin/git`
This commit is contained in:
ChillerDragon
2023-03-02 20:07:22 +01:00
parent 95648ef45c
commit 5ed4d6f99d

View File

@@ -447,7 +447,7 @@ fi
cd "/usr" || exit 1
####################################################################### script
USABLE_GIT="$(command -v git)"
USABLE_GIT="$(readlink -f "$(command -v git)")"
if [[ -z "${USABLE_GIT}" ]]
then
abort "$(