Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions make-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,20 +180,20 @@ function performNpmAudit(taskPath) {
shell: true
});

if (auditResult.error) {
if (auditResult.status) {
console.log(`\x1b[A\x1b[K❌ npm audit failed because the build task at "${taskPath}" has vulnerable dependencies.`);
console.log('👉 Please see details by running the command');
console.log(`\tnpm audit --prefix ${taskPath}`);
console.log('or execute the command with --BypassNpmAudit argument to skip the auditing');
console.log(`\tnode make.js --build --task ${args.task} --BypassNpmAudit`);
process.exit(1);
console.log(`\tnode make.js build --task ${args.task} --BypassNpmAudit`);
throw new Error(`npm audit failed with exit code: ${auditResult.status}`);
} else {
console.log('\x1b[A\x1b[K✅ npm audit completed successfully.');
}
} catch (error) {
console.error('\x1b[A\x1b[K❌ "performNpmAudit" failed.');
console.error(error.message);
process.exit(1);
throw error;
}
}

Expand Down Expand Up @@ -916,10 +916,10 @@ var validateUuid = function (uuid) {

try {
const uuidLib = require('node-uuid');

// node-uuid.parse() returns a buffer if valid, throws if invalid
var parsed = uuidLib.parse(uuid);

// If parse succeeds and returns a 16-byte buffer, the UUID is valid
return parsed && parsed.length === 16;
} catch (error) {
Expand Down Expand Up @@ -1902,7 +1902,7 @@ var processGeneratedTasks = function (baseConfigToolPath, taskList, makeOptions,
}
if (useSemverBuildConfig === true || useSemverBuildConfig === 'true') {
writeUpdateArg += " --use-semver-build-config";
}
}

var debugAgentDirArg = "";
if(debugAgentDir) {
Expand Down