Skip to content

Commit 2805efc

Browse files
committed
Attempt to improve error handling
1 parent a7dcf54 commit 2805efc

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/dotnetCi.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ jobs:
109109
projName=${projNameArray[1]}
110110
assemblyPath=$proj/bin/$Configuration/$Tfm/$projName.dll
111111
coverlet "$assemblyPath" --target "dotnet" --targetargs "test $proj -c $Configuration --no-build --logger:nunit --test-adapter-path:." -f=opencover -o="TestResults/$projName.opencover.xml"
112-
if [ $? -ne 0 ]
112+
exitCode=$?
113+
if [ $exitCode -ne 0 ]
113114
then
114115
echo "One or more tests have failed; this build should eventually fail"
115116
echo "failures=true" >> "$GITHUB_OUTPUT"
@@ -121,9 +122,10 @@ jobs:
121122
run: |
122123
cd CSF.Screenplay.JsonToHtmlReport.Template/src
123124
npm test
124-
if [ $? -ne 0 ]
125+
exitCode=$?
126+
if [ $exitCode -ne 0 ]
125127
then
126-
echo "One or more tests have failed; this build should eventually fail"
128+
echo "One or more tests have failed; this build should eventually fail"
127129
echo "failures=true" >> "$GITHUB_OUTPUT"
128130
fi
129131
cd ../..

0 commit comments

Comments
 (0)