fix: let warnaserror "false" disable -warnaserror

Even as a string input, act_runner delivers the value as
'%!t(string=false)', so an exact comparison never matches.
Match case-insensitively on the substring "false" instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
UltimateCoderandClaude Opus 5.5 committed 2026-10-15 22:34:41 +02:00
1 parent abae212813
commit 67b6a24726
3 files changed
+13 -9

No files matched your search

@@ -18,7 +18,7 @@ on:
required: false
default: "Release"
type: string
# string, not boolean: act_runner mangles boolean defaults (format() yields '%!t(string=false)').
# string, not boolean: act_runner mangles boolean defaults. The value may still arrive as '%!t(string=…)', see Build step.
warnaserror:
description: "Treat build warnings as errors (\"true\"/\"false\")"
required: false
@@ -101,9 +101,11 @@ jobs:
- name: Build
run: |
ARGS=(-c "$CONFIGURATION" --no-restore)
if [ "${WARNASERROR,,}" != "false" ]; then
ARGS+=(-warnaserror)
fi
# act_runner may deliver the value mangled as '%!t(string=false)', so match by substring.
case "${WARNASERROR,,}" in
*false*) ;;
*) ARGS+=(-warnaserror) ;;
esac
set -x
dotnet build ${SOLUTION:+"$SOLUTION"} "${ARGS[@]}"