hashed logs

This commit is contained in:
Frostebite 2023-08-14 22:19:26 +01:00
parent 174bda8060
commit debe4730fa
3 changed files with 10 additions and 1 deletions

BIN
dist/index.js generated vendored

Binary file not shown.

BIN
dist/index.js.map generated vendored

Binary file not shown.

View File

@ -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);
@ -38,6 +44,9 @@ export class CloudRunnerSystem {
output += diagnosticOutput;
}
const outputChunk = `${stdout}`;
if (outputCallback) {
outputCallback(outputChunk);
}
output += outputChunk;
});
child.on('close', (code) => {