BrettMayson / HEMTT

Build System for Arma 3
http://hemtt.dev/
GNU General Public License v2.0
115 stars 40 forks source link

Failed build returns successful exit code #647

Closed Timi007 closed 9 months ago

Timi007 commented 10 months ago

Versions: HEMTT: 1.11.0

Description:

If the build fails due to an error in the addon, e.g. because a semicolon is missing, the executable still returns a successful exit code (zero). As a result, CI actions do not fail (this occurs every time, not only in CI).

Sample project comtaining missing semicolon in config: https://github.com/Timi007/hemtt-actions-test CI output: https://github.com/Timi007/hemtt-actions-test/actions/runs/7802229004/job/21279171098

Run build (or dev/check):

$ hemtt build
 INFO Config loaded for Test 1.0.0.240205
 INFO Creating `build` version
 INFO Rapified 1 addon configs

...

error[CE4]: property is missing a semicolon
   ┌─ addons/main/config.cpp:31:1
   │
31 │ TEST(aaa,"bbbb")
   │ ^ missing semicolon
   │
   = help: add a semicolon ; to the end of the property

Show exit code:

$ echo $LASTEXITCODE
0

Last lines of trace show:

2024-02-06T15:44:16.671309Z TRACE ThreadId(01) phase: pre_build (Rapifier) (failed)
2024-02-06T15:44:16.673770Z TRACE ThreadId(01) writing ci annotations to .hemttout/ci_annotations.txt
2024-02-06T15:44:16.674847Z TRACE ThreadId(01) wrote 7 ci annotations to .hemttout/ci_annotations.txt
BrettMayson commented 9 months ago

Already fixed since 1.11.0, will be in 1.11.1