fix: Show Passt output on error (#1059)

This commit is contained in:
Kroese 2025-10-13 14:11:54 +02:00 committed by GitHub
parent c3302e1720
commit 1ffc5c55b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -324,12 +324,19 @@ configurePasst() {
[[ "$DEBUG" == [Yy1]* ]] && printf "Passt arguments:\n\n%s\n\n" "${PASST_OPTS// -/$'\n-'}" [[ "$DEBUG" == [Yy1]* ]] && printf "Passt arguments:\n\n%s\n\n" "${PASST_OPTS// -/$'\n-'}"
if ! $PASST ${PASST_OPTS:+ $PASST_OPTS} >/dev/null 2>&1; then if ! $PASST ${PASST_OPTS:+ $PASST_OPTS} >/dev/null 2>&1; then
local msg="Failed to start passt, reason: $?"
rm -f "$log"
PASST_OPTS="${PASST_OPTS/ -q/}"
{ $PASST ${PASST_OPTS:+ $PASST_OPTS}; rc=$?; } || :
if (( rc != 0 )); then
[ -f "$log" ] && cat "$log" [ -f "$log" ] && cat "$log"
error "$msg" error "Failed to start passt, reason: $rc"
return 1 return 1
fi fi
fi
if [[ "$PASST_DEBUG" == [Yy1]* ]]; then if [[ "$PASST_DEBUG" == [Yy1]* ]]; then
tail -fn +0 "$log" --pid=$$ & tail -fn +0 "$log" --pid=$$ &
else else