Skip to content

Commit 0acccd6

Browse files
committed
Fix bash printf misreading '---' as option in FIPS log dump
The leading '---' in the second printf format string makes bash bail with 'printf: --: invalid option' (the first call survived because of a leading newline). Switch to echo, which has no equivalent parsing surprise for content starting with dashes, and use '==>' markers in the captured log.
1 parent 0f4d53b commit 0acccd6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

scripts/utils-wolfssl.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,11 @@ install_wolfssl() {
251251
if [ $RET_CODE != 0 ]; then
252252
printf "ERROR checking out FIPS (return code: $RET_CODE)\n"
253253
if [ -f "$LOG_FILE" ]; then
254-
printf "\n--- %s output: ---\n" "$fips_check_script"
254+
echo ""
255+
echo "==> $fips_check_script output:"
255256
cat "$LOG_FILE"
256-
printf "--- end %s output ---\n\n" "$fips_check_script"
257+
echo "==> end $fips_check_script output"
258+
echo ""
257259
fi
258260
rm -rf ${WOLFSSL_INSTALL_DIR}
259261
do_cleanup

0 commit comments

Comments
 (0)