Whether make succeeds or fails $? is always 1.
script:
- make -j 4
- COMPILE_RESULT=$?
- echo COMPILE_RESULT=${COMPILE_RESULT}
output:
..
The command "make -j 4" exited with 0.
$ COMPILE_RESULT=$?
The command "COMPILE_RESULT=$?" exited with 0.
$ echo COMPILE_RESULT=${COMPILE_RESULT}
COMPILE_RESULT=1
Whether make succeeds or fails $? is always 1.
script: - make -j 4 - COMPILE_RESULT=$? - echo COMPILE_RESULT=${COMPILE_RESULT}output:
.. The command "make -j 4" exited with 0. $ COMPILE_RESULT=$? The command "COMPILE_RESULT=$?" exited with 0. $ echo COMPILE_RESULT=${COMPILE_RESULT} COMPILE_RESULT=1