Fix occasional 'libexec/pyenv-latest: line 39: printf: write error: Broken pipe' (#2729)

This commit is contained in:
native-api 2023-06-20 03:04:06 +03:00 committed by GitHub
parent c5d2639082
commit fe76b05445
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,7 @@ IFS=$'\n'
DEFINITION_CANDIDATES=( $(python-build --definitions ) )
fi
if printf '%s\n' "${DEFINITION_CANDIDATES[@]}" | grep -qxFe "$prefix"; then
if printf '%s\n' "${DEFINITION_CANDIDATES[@]}" 2>/dev/null | grep -qxFe "$prefix"; then
echo "$prefix"
exit $exitcode;
fi