siemens / kas

Setup tool for bitbake based projects
MIT License
371 stars 148 forks source link

Error handling in shell script #85

Closed tewarid closed 2 years ago

tewarid commented 2 years ago

I want to run some commands after a successful kas build, hence my shell script looks like

kas build ...
if [ $? -eq 0 ]; then
...

Even though kas build fails, the commands still run.

Am I missing something?

jan-kiszka commented 2 years ago

I cannot confirm this, e.g. by calling kas build config.yaml --target invalid. $? is non-zero in that case. How exactly did kas fail?

tewarid commented 2 years ago

kas (I'm using version 3.1 now) is propagating bitbake error as expected. Closing issue as I don't see it now.