hashed logs
parent
174bda8060
commit
debe4730fa
|
@ -4712,7 +4712,9 @@ class CloudRunnerSystem {
|
||||||
return lineValues[lineValues.length - 1];
|
return lineValues[lineValues.length - 1];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static async Run(command, suppressError = false, suppressLogs = false) {
|
static async Run(command, suppressError = false, suppressLogs = false,
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
outputCallback) {
|
||||||
for (const element of command.split(`\n`)) {
|
for (const element of command.split(`\n`)) {
|
||||||
if (!suppressLogs) {
|
if (!suppressLogs) {
|
||||||
remote_client_logger_1.RemoteClientLogger.log(element);
|
remote_client_logger_1.RemoteClientLogger.log(element);
|
||||||
|
@ -4733,6 +4735,9 @@ class CloudRunnerSystem {
|
||||||
output += diagnosticOutput;
|
output += diagnosticOutput;
|
||||||
}
|
}
|
||||||
const outputChunk = `${stdout}`;
|
const outputChunk = `${stdout}`;
|
||||||
|
if (outputCallback) {
|
||||||
|
outputCallback(outputChunk);
|
||||||
|
}
|
||||||
output += outputChunk;
|
output += outputChunk;
|
||||||
});
|
});
|
||||||
child.on('close', (code) => {
|
child.on('close', (code) => {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -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`)) {
|
for (const element of command.split(`\n`)) {
|
||||||
if (!suppressLogs) {
|
if (!suppressLogs) {
|
||||||
RemoteClientLogger.log(element);
|
RemoteClientLogger.log(element);
|
||||||
|
@ -38,6 +44,9 @@ export class CloudRunnerSystem {
|
||||||
output += diagnosticOutput;
|
output += diagnosticOutput;
|
||||||
}
|
}
|
||||||
const outputChunk = `${stdout}`;
|
const outputChunk = `${stdout}`;
|
||||||
|
if (outputCallback) {
|
||||||
|
outputCallback(outputChunk);
|
||||||
|
}
|
||||||
output += outputChunk;
|
output += outputChunk;
|
||||||
});
|
});
|
||||||
child.on('close', (code) => {
|
child.on('close', (code) => {
|
||||||
|
|
Loading…
Reference in New Issue