From c3c6a3261fa4427f4f577b591eb4204f01372cd1 Mon Sep 17 00:00:00 2001 From: "Fabio R. Sluzala" Date: Sat, 20 Sep 2025 21:30:19 -0300 Subject: [PATCH] Update tests for successful help exit --- llvmup | 13 ++++++-- tests/integration/test_enhanced_workflow.bats | 4 +-- tests/unit/test_llvmup_config_activate.bats | 2 +- tests/unit/test_llvmup_enhanced.bats | 32 +++++++++---------- tests/unit/test_llvmup_libc_wno_error.bats | 4 +-- 5 files changed, 31 insertions(+), 24 deletions(-) diff --git a/llvmup b/llvmup index 5fc84b6..6659def 100755 --- a/llvmup +++ b/llvmup @@ -226,6 +226,13 @@ log_error() { } usage() { + local previous_exit=$? + local exit_code="${1:-$previous_exit}" + + if [ $# -eq 0 ] && [ "$exit_code" -eq 0 ]; then + exit_code=1 + fi + cat <