Merge branch 'fix/rbenv-help-type-broken-pipe-upstream'

This commit is contained in:
Mislav Marohnić 2019-10-23 14:51:15 +02:00
commit 0c3967aa32
4 changed files with 11 additions and 4 deletions

View file

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

View file

@ -42,8 +42,15 @@ extract_initial_comment_block() {
}
collect_documentation() {
local awk
awk="$(type -p gawk awk 2>/dev/null | head -1)"
if [ -z "$awk" ]; then
echo "rbenv: cannot find awk" >&2
return 1
fi
# shellcheck disable=SC2016
$(type -p gawk awk | head -1) '
"$awk" '
/^Summary:/ {
summary = substr($0, 10)
next

View file

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

View file

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