chore: oneliner output for command debug logs
parent
38285d014c
commit
4d8b198d3f
|
|
@ -74,6 +74,8 @@
|
|||
// App it not yet internationalised
|
||||
"i18n-text/no-en": "off",
|
||||
// Showing false positives (enable after upgrading)
|
||||
"no-shadow": "off"
|
||||
"no-shadow": "off",
|
||||
// (enable to add improvements)
|
||||
"unicorn/no-static-only-class": "off"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ interface IOptions {
|
|||
continueOnError?: boolean;
|
||||
}
|
||||
|
||||
// Todo - change signature of exec inside the code instead of adapting the exec method
|
||||
const exec = async (
|
||||
command: string,
|
||||
args: string | string[] = [],
|
||||
|
|
@ -47,15 +46,14 @@ const exec = async (
|
|||
if (ignoreReturnCode) options.continueOnError = true;
|
||||
|
||||
const argsString = typeof args === 'string' ? args : args.join(' ');
|
||||
log.debug('Command: ', command, argsString);
|
||||
|
||||
const result: ICommandResult = await originalExec(`${command} ${argsString}`, options);
|
||||
|
||||
log.debug('Result:', result);
|
||||
|
||||
const { status, output = '' } = result;
|
||||
const { code: exitCode, success } = status;
|
||||
|
||||
const symbol = success ? '✅' : '❗';
|
||||
log.debug('Command:', command, argsString, symbol, result);
|
||||
|
||||
return { exitCode, success, output: output.trim() };
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue