diff --git a/plugins/pyenv-binary/libexec/pyenv-binary-save b/plugins/pyenv-binary/libexec/pyenv-binary-save index 3caf2ba2..16019c71 100755 --- a/plugins/pyenv-binary/libexec/pyenv-binary-save +++ b/plugins/pyenv-binary/libexec/pyenv-binary-save @@ -92,7 +92,7 @@ fi if [ "$os" = "Linux" ]; then libc="$(getconf GNU_LIBC_VERSION 2>/dev/null || true)" fi -if [ "$os" != "Darwin" ] && ! LC_ALL=C readelf --version >/dev/null 2>&1; then +if [ "$os" != "Darwin" ] && ! LC_ALL=C readelf --version &>/dev/null; then echo "pyenv-binary: need readelf to inspect shared libraries" >&2 exit 1 fi diff --git a/plugins/pyenv-binary/test/save.bats b/plugins/pyenv-binary/test/save.bats index bb4e6e8a..9c2d745a 100644 --- a/plugins/pyenv-binary/test/save.bats +++ b/plugins/pyenv-binary/test/save.bats @@ -2,10 +2,6 @@ load test_helper -_setup() { - create_path_executable readelf "exit 0" -} - create_version() { mkdir -p "${PYENV_ROOT}/versions/$1/bin" } diff --git a/test/Dockerfile b/test/Dockerfile index 659c2de7..58fd3f21 100644 --- a/test/Dockerfile +++ b/test/Dockerfile @@ -12,7 +12,7 @@ FROM bash:$BASH apk add sed coreutils findutils \ ;fi # Bats - RUN apk add --update parallel ncurses git \ + RUN apk add --update parallel ncurses git binutils \ && mkdir -p ~/.parallel \ && touch ~/.parallel/will-cite COPY --from=bats /root/bats-core /root/bats-core diff --git a/test/test_helper.bash b/test/test_helper.bash index c989de67..2d3d1c11 100644 --- a/test/test_helper.bash +++ b/test/test_helper.bash @@ -165,7 +165,7 @@ path_without() { if [ "$found" != "${PYENV_ROOT}/shims" ]; then alt="${PYENV_TEST_DIR}/$(echo "${found#/}" | tr '/' '-')" mkdir -p "$alt" - for util in basename bash cut greadlink head mkdir readlink sed sort tr xargs; do + for util in basename bash cut dirname find greadlink gzip head mkdir readlink sed sort tar tr xargs; do if [ -x "${found}/$util" ]; then ln -s "${found}/$util" "${alt}/$util" fi