@@ -30,7 +30,8 @@ const guardAtmosInstalled = async () => {
30
30
const args = process . argv . slice ( 2 ) ;
31
31
const options = {
32
32
listeners,
33
- ignoreReturnCode : true
33
+ ignoreReturnCode : true ,
34
+ silent : true // avoid printing command in stdout: https://github.com/actions/toolkit/issues/649
34
35
} ;
35
36
36
37
const exitCode = await exec ( pathToCLI , args , options ) ;
@@ -39,14 +40,18 @@ const guardAtmosInstalled = async () => {
39
40
core . debug ( `stderr: ${ stderr . contents } ` ) ;
40
41
core . debug ( `exitcode: ${ exitCode } ` ) ;
41
42
43
+ // Pass-through stdout/err as `exec` won't anymore because we are passing `silent: true` option
44
+ process . stdout . write ( stdout . contents ) ;
45
+ process . stderr . write ( stderr . contents ) ;
46
+
42
47
// Set outputs, result, exitcode, and stderr
43
48
core . setOutput ( "stdout" , stdout . contents ) ;
44
49
core . setOutput ( "stderr" , stderr . contents ) ;
45
50
core . setOutput ( "exitcode" , exitCode . toString ( 10 ) ) ;
46
51
47
52
if ( exitCode === 0 || exitCode === 2 ) {
48
53
// A exitCode of 0 is considered a success
49
- // An exitCode of 2 may be returned when the '-detailed-exitcode' option is passed to terraform plan. This denotes
54
+ // An exitCode of 2 may be returned when the '-detailed-exitcode' option is passed to atmos terraform plan. This denotes
50
55
// Success with non-empty diff (changes present).
51
56
return ;
52
57
}
0 commit comments