mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 20:20:49 +00:00
Handle PR Comments
This commit is contained in:
parent
ea383a18de
commit
240123372a
5 changed files with 24 additions and 14 deletions
|
|
@ -16,18 +16,20 @@ export async function main(args) {
|
|||
args = initializeCliArguments(args);
|
||||
|
||||
if (shouldScanCommand(args)) {
|
||||
const resultCode = await scanCommand(args);
|
||||
const commandScanResult = await scanCommand(args);
|
||||
|
||||
// Returning the exit code back to the caller allows the promise
|
||||
// to be awaited in the bin files and return the correct exit code
|
||||
if (resultCode !== 0) {
|
||||
return resultCode;
|
||||
if (commandScanResult !== 0) {
|
||||
return commandScanResult;
|
||||
}
|
||||
}
|
||||
|
||||
var result = await getPackageManager().runCommand(args);
|
||||
const packageManagerResult = await getPackageManager().runCommand(args);
|
||||
|
||||
proxy.verifyNoMaliciousPackages();
|
||||
if (!proxy.verifyNoMaliciousPackages()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
ui.emptyLine();
|
||||
ui.writeInformation(
|
||||
|
|
@ -38,7 +40,7 @@ export async function main(args) {
|
|||
|
||||
// Returning the exit code back to the caller allows the promise
|
||||
// to be awaited in the bin files and return the correct exit code
|
||||
return result.status;
|
||||
return packageManagerResult.status;
|
||||
} catch (error) {
|
||||
ui.writeError("Failed to check for malicious packages:", error.message);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue