Skip to content

Commit 41244a5

Browse files
authored
Stream output when debug is enabled (#348)
Fixes #347
1 parent 4fd780a commit 41244a5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ import { parseDeployResponse, parseDescribeResponse } from './output-parser';
6060
// eslint-disable-next-line @typescript-eslint/no-var-requires
6161
const { version: appVersion } = require('../package.json');
6262

63+
// isDebug returns true if runner debugging or step debugging is enabled.
64+
const isDebug =
65+
parseBoolean(process.env.ACTIONS_RUNNER_DEBUG) || parseBoolean(process.env.ACTIONS_STEP_DEBUG);
66+
6367
// originalAppYamlContents and originalAppYamlPath is a reference to the
6468
// original app.yaml contents and path.
6569
let originalAppYamlContents: string, originalAppYamlPath: string;
@@ -198,7 +202,7 @@ export async function run(): Promise<void> {
198202
logWarning('No authentication found, authenticate with `google-github-actions/auth`.');
199203
}
200204

201-
const options = { silent: true, ignoreReturnCode: true };
205+
const options = { silent: !isDebug, ignoreReturnCode: true };
202206
const deployCommandString = `${toolCommand} ${appDeployCmd.join(' ')}`;
203207
logInfo(`Running: ${deployCommandString}`);
204208

0 commit comments

Comments
 (0)