Run makefile command from bash script and return error result code

前端 未结 1 1061
甜味超标
甜味超标 2021-01-24 04:10

I have a python makefile. I can run its commands from my bash script as below

local make_lint_output=\"\"
make_lint_output=\"$( make test-unit  2>&1 )\"
e         


        
1条回答
  •  一整个雨季
    2021-01-24 04:58

    echo is succeeding, and thus returning 0. You have to capture the return code before running another command that may clobber $? (before the echo).

    0 讨论(0)
提交回复
热议问题