kiss: Fixes to post-install output.

This commit is contained in:
Dylan Araps 2020-07-24 02:03:36 +03:00
parent c7b32e6531
commit b1bd880c07
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

10
kiss
View File

@ -1157,9 +1157,13 @@ pkg_install() {
hook_output=$("$sys_db/$pkg_name/post-install" 2>&1)
[ -z "$hook_output" ] ||
printf '=> %s post-install log\n%s\n' "$pkg_name" "$hook_output" |
tee -a "$log_dir/post-install-$time-$pid" >/dev/null
[ -z "$hook_output" ] || {
log "$pkg_name" "Running post-install hook" 2>&1
printf '%s\n' "$hook_output"
} |
# 'tee' is used as we would still like to display 'stderr'
tee -a "$log_dir/post-install-$time-$pid" >/dev/null
fi
run_hook post-install "$pkg_name" "$sys_db/$pkg_name"