Skip to content

Commit

Permalink
hashed logs
Browse files Browse the repository at this point in the history
  • Loading branch information
frostebite committed Aug 14, 2023
1 parent 174bda8 commit debe473
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
7 changes: 6 additions & 1 deletion dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion src/model/cloud-runner/services/core/cloud-runner-system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ export class CloudRunnerSystem {
});
}

public static async Run(command: string, suppressError = false, suppressLogs = false) {
public static async Run(
command: string,
suppressError = false,
suppressLogs = false,
// eslint-disable-next-line no-unused-vars
outputCallback?: (output: string) => void,
) {
for (const element of command.split(`\n`)) {
if (!suppressLogs) {
RemoteClientLogger.log(element);
Expand All @@ -38,6 +44,9 @@ export class CloudRunnerSystem {
output += diagnosticOutput;
}
const outputChunk = `${stdout}`;
if (outputCallback) {
outputCallback(outputChunk);
}
output += outputChunk;
});
child.on('close', (code) => {
Expand Down

0 comments on commit debe473

Please sign in to comment.