scc: Fix process_file error check
PATCH 1/1 scc: Fix process_file error check
Commit 626ceac135fa66277c2fa53197be33cc9d4d7614 broke the error check in process_file by adding in three lines that stomp on $? which print the output file when verbose is set.
Move output file on verbose print to an elif after the error check.
Signed-off-by George McCollister <[email protected]>
--- tools/scc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
tools/scc +2 -4
@@ -246,10 +246,6 @@ process_file() ) ) - if [ -n "${verbose}" ]; then - cat ${scc_output_file} - fi - if [ $? -ne 0 ]; then echo "[ERROR]: processing of file $in failed" cat ${scc_output_file}
@@ -275,6 +271,8 @@ process_file() fi rm -f ${scc_output_file} exit 1 + elif [ -n "${verbose}" ]; then + cat ${scc_output_file} fi rm -f ${scc_output_file}
Signature · 1 line
2.11.0
Quoted 5 lines · George McCollister
Commit
626ceac135fa66277c2fa53197be33cc9d4d7614broke the error check inprocess_fileby adding in three lines that stomp on $? which print the output file when verbose is set.Move output file on verbose print to an elif after the error check.
Good catch!
Merged.
My oe-core submissions are queued up at the moment, but I'll have this in my next batch.
Bruce
Quoted 31 lines
Signed-off-by George McCollister <[email protected]>--- tools/scc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)tools/scc +2
-4@@ -246,10 +246,6 @@ process_file() ) ) - if [ -n "${verbose}" ]; then - cat ${scc_output_file} - fi - if [ $? -ne 0 ]; then echo "[ERROR]: processing of file $in failed" cat ${scc_output_file}@@ -275,6 +271,8 @@ process_file() fi rm -f ${scc_output_file} exit 1 + elif [ -n "${verbose}" ]; then + cat ${scc_output_file} fi rm -f ${scc_output_file}