mirror of
https://github.com/opentofu/setup-opentofu.git
synced 2025-12-05 23:34:45 +00:00
Fix tofu output printing debug information (#31)
Signed-off-by: Vladimir Masarik <masarik.vladimir7@gmail.com>
This commit is contained in:
parent
ae80d4ecaa
commit
12f4debbf6
2 changed files with 12 additions and 10 deletions
11
dist/index1.js
vendored
11
dist/index1.js
vendored
|
|
@ -4210,13 +4210,14 @@ async function checkTofu () {
|
|||
const args = process.argv.slice(2);
|
||||
const options = {
|
||||
listeners,
|
||||
ignoreReturnCode: true
|
||||
ignoreReturnCode: true,
|
||||
silent: true // don't print "[command...]" into stdout: https://github.com/actions/toolkit/issues/649
|
||||
};
|
||||
const exitCode = await exec(pathToCLI, args, options);
|
||||
core.debug(`OpenTofu exited with code ${exitCode}.`);
|
||||
core.debug(`stdout: ${stdout.contents}`);
|
||||
core.debug(`stderr: ${stderr.contents}`);
|
||||
core.debug(`exitcode: ${exitCode}`);
|
||||
|
||||
// Pass-through stdout/err as `exec` won't due to `silent: true` option
|
||||
process.stdout.write(stdout.contents);
|
||||
process.stderr.write(stderr.contents);
|
||||
|
||||
// Set outputs, result, exitcode, and stderr
|
||||
core.setOutput('stdout', stdout.contents);
|
||||
|
|
|
|||
|
|
@ -33,13 +33,14 @@ async function checkTofu () {
|
|||
const args = process.argv.slice(2);
|
||||
const options = {
|
||||
listeners,
|
||||
ignoreReturnCode: true
|
||||
ignoreReturnCode: true,
|
||||
silent: true // don't print "[command...]" into stdout: https://github.com/actions/toolkit/issues/649
|
||||
};
|
||||
const exitCode = await exec(pathToCLI, args, options);
|
||||
core.debug(`OpenTofu exited with code ${exitCode}.`);
|
||||
core.debug(`stdout: ${stdout.contents}`);
|
||||
core.debug(`stderr: ${stderr.contents}`);
|
||||
core.debug(`exitcode: ${exitCode}`);
|
||||
|
||||
// Pass-through stdout/err as `exec` won't due to `silent: true` option
|
||||
process.stdout.write(stdout.contents);
|
||||
process.stderr.write(stderr.contents);
|
||||
|
||||
// Set outputs, result, exitcode, and stderr
|
||||
core.setOutput('stdout', stdout.contents);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue