mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2026-09-10 07:16:18 -04:00
Shellcheck fixes, mostly quoting to avoid word splitting
This commit is contained in:
parent
563bcff28e
commit
97e1333197
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
if [ -L "${BASH_SOURCE}" ]; then
|
||||
if [ -L "${BASH_SOURCE[0]}" ]; then
|
||||
READLINK=$(type -p greadlink readlink | head -1)
|
||||
if [ -z "$READLINK" ]; then
|
||||
echo "pyenv: cannot find readlink - are you missing GNU coreutils?" >&2
|
||||
|
|
@ -16,12 +16,12 @@ if [ -L "${BASH_SOURCE}" ]; then
|
|||
resolve_link() {
|
||||
$READLINK -f "$1"
|
||||
}
|
||||
script_path=$(resolve_link ${BASH_SOURCE})
|
||||
script_path=$(resolve_link "${BASH_SOURCE[0]}")
|
||||
else
|
||||
script_path=${BASH_SOURCE}
|
||||
script_path="${BASH_SOURCE[0]}"
|
||||
fi
|
||||
|
||||
. ${script_path%/*}/../libexec/pyenv-virtualenv-realpath
|
||||
. "${script_path%/*}"/../libexec/pyenv-virtualenv-realpath
|
||||
|
||||
if [ -z "$PYENV_ROOT" ]; then
|
||||
PYENV_ROOT="${HOME}/.pyenv"
|
||||
|
|
@ -187,3 +187,4 @@ if [ "$num_versions" -eq 0 ] && [ -n "$include_system" ]; then
|
|||
echo "Warning: no Python virtualenv detected on the system" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue