Skip to content

Commit

Permalink
Only echo command if we are streaming the stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Mercer committed Oct 10, 2024
1 parent 90c42c4 commit edd7713
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
4 changes: 3 additions & 1 deletion lib/actions-util.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/actions-util.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/setup-codeql.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/setup-codeql.js.map

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/actions-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,9 @@ export async function runTool(
): Promise<string> {
let stdout = "";
let stderr = "";
process.stdout.write(`[command]${cmd} ${args.join(" ")}\n`);
if (!opts.noStreamStdout) {
process.stdout.write(`[command]${cmd} ${args.join(" ")}\n`);
}
const exitCode = await new toolrunner.ToolRunner(cmd, args, {
ignoreReturnCode: true,
listeners: {
Expand Down
6 changes: 3 additions & 3 deletions src/setup-codeql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,9 @@ export const downloadCodeQL = async function (
);

logger.info(
`Added CodeQL bundle to the tool cache (${
performance.now() - toolcacheStart
} ms).`,
`Added CodeQL bundle to the tool cache (${Math.round(
performance.now() - toolcacheStart,
)} ms).`,
);

// Defensive check: we expect `cacheDir` to copy the bundle to a new location.
Expand Down

0 comments on commit edd7713

Please sign in to comment.