6

I performed an experiment with sencha cmd version v7.0.0.40: I made some syntax errors in our ExtJs project sources. Then I ran sencha app build. There were many errors (like C2001: Closure Compiler Error...), but sencha cmd returned 0.

When I run sencha app build some abra cadabra - it returns 1 as expected.

There is a lonely post without answer on sencha forums: https://www.sencha.com/forum/showthread.php?262219-Sencha-Cmd-Error-Codes

So what is the standard way to detect sencha app build build errors in CI? Should I just parse its stderr/stdout or what? If it is important, I am on linux.


UPD: I noticed that sencha --strict app build returns error codes if there were warnings or errors and writes something like [WRN] Exiting with code 22, 176 warnings and 8 errors as the last string in stdout. So for now I am going to use --strict and parse this last string. If somebody has easier solution - let me know, please.


UPD2: Sencha cmd 7.0+ has a config option for warnings level. https://docs.sencha.com/cmd/7.0.0/guides/whats_new_cmd70.html

So we decided to remove all warnings and check return code from sencha --strict app build.


Dzenly
  • 1,611
  • 12
  • 18

1 Answers1

0

To detect error reason you can use flag -D (debug)

sencha -D app build
Andrew Koshkin
  • 446
  • 3
  • 16