1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-15 23:03:53 -05:00

Support for BusyBox version of `head' (#2629)

This commit is contained in:
Florian Schüller
2023-02-22 18:11:48 +01:00
committed by GitHub
parent 86a4423bbb
commit 68918e69b7
9 changed files with 14 additions and 14 deletions

View File

@@ -29,7 +29,7 @@ if enable -f "${BASH_SOURCE%/*}"/../libexec/pyenv-realpath.dylib realpath 2>/dev
else
[ -z "$PYENV_NATIVE_EXT" ] || abort "failed to load \`realpath' builtin"
READLINK=$(type -P greadlink readlink | head -1)
READLINK=$(type -P greadlink readlink | head -n1)
[ -n "$READLINK" ] || abort "cannot find readlink - are you missing GNU coreutils?"
resolve_link() {

View File

@@ -46,7 +46,7 @@ extract_initial_comment_block() {
collect_documentation() {
# `tail` prevents "broken pipe" errors due to `head` closing the pipe without reading everything
# https://superuser.com/questions/554855/how-can-i-fix-a-broken-pipe-error/642932#642932
$(type -P gawk awk | tail -n +1 | head -1) '
$(type -P gawk awk | tail -n +1 | head -n1) '
/^Summary:/ {
summary = substr($0, 10)
next

View File

@@ -26,7 +26,7 @@ if ! enable -f "${BASH_SOURCE%/*}"/pyenv-realpath.dylib realpath 2>/dev/null; th
echo "pyenv: failed to load \`realpath' builtin" >&2
exit 1
fi
READLINK=$(type -P greadlink readlink | head -1)
READLINK=$(type -P greadlink readlink | head -n1)
if [ -z "$READLINK" ]; then
echo "pyenv: cannot find readlink - are you missing GNU coreutils?" >&2
exit 1

View File

@@ -34,7 +34,7 @@ if ! enable -f "${BASH_SOURCE%/*}"/pyenv-realpath.dylib realpath 2>/dev/null; th
exit 1
fi
READLINK=$(type -P greadlink readlink | head -1)
READLINK=$(type -P greadlink readlink | head -n1)
if [ -z "$READLINK" ]; then
echo "pyenv: cannot find readlink - are you missing GNU coreutils?" >&2
exit 1