`setupvars.sh`: ignore `cd` output (#20657)
* `setupvars.sh`: ignore `cd` output
Having `function cd() { builtin cd "$@" && l; }` defined in bash breaks `setupvars.sh`
* Use `builtin cd` to enable `function cd() { builtin cd "$@" && l; }`, remove wrapping `echo $()` because `pwd` already prints
This commit is contained in:
parent
0125c89738
commit
f97e7f1c9d
|
|
@ -6,7 +6,8 @@
|
|||
abs_path () {
|
||||
script_path=$(eval echo "$1")
|
||||
directory=$(dirname "$script_path")
|
||||
echo "$(cd "$directory" || exit; pwd -P)";
|
||||
builtin cd "$directory" || exit
|
||||
pwd -P
|
||||
}
|
||||
|
||||
SCRIPT_DIR="$(abs_path "${BASH_SOURCE[0]}")" >/dev/null 2>&1
|
||||
|
|
|
|||
Loading…
Reference in New Issue