fix(bash): override pipestatus when BP_PIPESTATUS is greater or equal

This commit is contained in:
Jan De Dobbeleer 2024-01-10 08:00:48 +01:00 committed by Jan De Dobbeleer
parent 0a9ddf1957
commit f078d13cca

View file

@ -47,7 +47,7 @@ function set_poshcontext() {
function _omp_hook() {
local ret=$? pipeStatus=(${PIPESTATUS[@]})
if [[ "${#BP_PIPESTATUS[@]}" -gt "${#pipeStatus[@]}" ]]; then
if [[ "${#BP_PIPESTATUS[@]}" -ge "${#pipeStatus[@]}" ]]; then
pipeStatus=(${BP_PIPESTATUS[@]})
fi