mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Add verbose logging setting + setup buffering of logs to prevent interleaving logs with the package manager.
This commit is contained in:
parent
0b393eeb5f
commit
c5e25f4813
4 changed files with 64 additions and 7 deletions
|
|
@ -25,8 +25,16 @@ export async function main(args) {
|
|||
}
|
||||
}
|
||||
|
||||
// Buffer logs during package manager execution, this avoids interleaving
|
||||
// of logs from the package manager and safe-chain
|
||||
// Not doing this could cause bugs to disappear when cursor movement codes
|
||||
// are written by the package manager while safe-chain is writing logs
|
||||
ui.startBufferingLogs();
|
||||
const packageManagerResult = await getPackageManager().runCommand(args);
|
||||
|
||||
// Write all buffered logs
|
||||
ui.writeBufferedLogsAndStopBuffering();
|
||||
|
||||
if (!proxy.verifyNoMaliciousPackages()) {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue