@xcelera/cli 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action.js +7 -2
- package/dist/action.js.map +1 -1
- package/dist/cli.js +7 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -9304,14 +9304,15 @@ async function isGitRepository() {
|
|
|
9304
9304
|
}
|
|
9305
9305
|
async function getCommit(hash = 'HEAD') {
|
|
9306
9306
|
// format: %H: commit hash, %s: subject, %an: author name, %ae: author email, %ai: author date
|
|
9307
|
+
// Use null byte (%x00) as delimiter - cannot appear in commit data
|
|
9307
9308
|
const commit = await simpleGit().show([
|
|
9308
9309
|
hash,
|
|
9309
9310
|
'--no-patch',
|
|
9310
|
-
'--format=%H
|
|
9311
|
+
'--format=%H%x00%s%x00%an%x00%ae%x00%ai'
|
|
9311
9312
|
]);
|
|
9312
9313
|
const [resolvedHash, message, author_name, author_email, date] = commit
|
|
9313
9314
|
.trim()
|
|
9314
|
-
.split('
|
|
9315
|
+
.split('\0');
|
|
9315
9316
|
if (!resolvedHash) {
|
|
9316
9317
|
throw new Error(`No commit found for ${hash}`);
|
|
9317
9318
|
}
|
|
@@ -9376,6 +9377,10 @@ async function runAuditCommand(url, token) {
|
|
|
9376
9377
|
catch (error) {
|
|
9377
9378
|
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
9378
9379
|
errors.push(`❌ ${errorMessage}`);
|
|
9380
|
+
if (error instanceof Error && error.stack) {
|
|
9381
|
+
errors.push('');
|
|
9382
|
+
errors.push(error.stack);
|
|
9383
|
+
}
|
|
9379
9384
|
return { exitCode: 1, output, errors };
|
|
9380
9385
|
}
|
|
9381
9386
|
}
|