From f078d13cca9d37a80d4b5f4498376341e4318fe3 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Wed, 10 Jan 2024 08:00:48 +0100 Subject: [PATCH] fix(bash): override pipestatus when BP_PIPESTATUS is greater or equal --- src/shell/scripts/omp.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shell/scripts/omp.bash b/src/shell/scripts/omp.bash index 33c2007b..61321d1e 100644 --- a/src/shell/scripts/omp.bash +++ b/src/shell/scripts/omp.bash @@ -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