File tree Expand file tree Collapse file tree 2 files changed +12
-14
lines changed Expand file tree Collapse file tree 2 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -3596,13 +3596,12 @@ async function checkTflint() {
35963596 core . setOutput ( 'stderr' , stderr . contents ) ;
35973597 core . setOutput ( 'exitcode' , exitCode . toString ( 10 ) ) ;
35983598
3599- if ( exitCode === 0 || exitCode === 2 ) {
3600- // A exitCode of 0 is considered a success
3601- // An exitCode of 2 denotes no errors occurred, but issues found
3602- return ;
3599+ if ( exitCode !== 0 ) {
3600+ // Any non-zero exit code is considered a failure
3601+ // Exit code 1: Errors in tflint execution
3602+ // Exit code 2: Issues found above --minimum-failure-severity threshold
3603+ // Exit code 3+: Other errors
3604+ core . setFailed ( `TFLint exited with code ${ exitCode } .` ) ;
36033605 }
3604-
3605- // A non-zero exitCode is considered an error
3606- core . setFailed ( `TFLint exited with code ${ exitCode } .` ) ;
36073606} ) ( ) ;
36083607
Original file line number Diff line number Diff line change @@ -41,12 +41,11 @@ async function checkTflint() {
4141 core . setOutput ( 'stderr' , stderr . contents ) ;
4242 core . setOutput ( 'exitcode' , exitCode . toString ( 10 ) ) ;
4343
44- if ( exitCode === 0 || exitCode === 2 ) {
45- // A exitCode of 0 is considered a success
46- // An exitCode of 2 denotes no errors occurred, but issues found
47- return ;
44+ if ( exitCode !== 0 ) {
45+ // Any non-zero exit code is considered a failure
46+ // Exit code 1: Errors in tflint execution
47+ // Exit code 2: Issues found above --minimum-failure-severity threshold
48+ // Exit code 3+: Other errors
49+ core . setFailed ( `TFLint exited with code ${ exitCode } .` ) ;
4850 }
49-
50- // A non-zero exitCode is considered an error
51- core . setFailed ( `TFLint exited with code ${ exitCode } .` ) ;
5251} ) ( ) ;
You can’t perform that action at this time.
0 commit comments