Skip to content

Commit d056825

Browse files
committed
Dump FIPS check script log on failure for actionable error reporting
When fips-check-PILOT.sh or fips-check.sh exits non-zero, cat the captured log to stdout instead of leaving the user with just the rc value and a log file they may not have access to (e.g. inside a Jenkins workspace). The preceding redirect on line 229 uses single '>' so LOG_FILE at this point contains only the failed script's output. Diagnostic-only change; success path is unchanged.
1 parent 0ac0081 commit d056825

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

scripts/utils-wolfssl.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,11 @@ install_wolfssl() {
235235
fi
236236
if [ $RET_CODE != 0 ]; then
237237
printf "ERROR checking out FIPS (return code: $RET_CODE)\n"
238+
if [ -f "$LOG_FILE" ]; then
239+
printf "\n--- %s output: ---\n" "$fips_check_script"
240+
cat "$LOG_FILE"
241+
printf "--- end %s output ---\n\n" "$fips_check_script"
242+
fi
238243
rm -rf ${WOLFSSL_INSTALL_DIR}
239244
do_cleanup
240245
exit 1

0 commit comments

Comments
 (0)