Skip to content

Commit 36c0a88

Browse files
committed
debugLog nits
1 parent c324606 commit 36c0a88

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/utils/semver.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function getMajor(version: string): number | null {
6262
try {
6363
return semver.major(coerced)
6464
} catch (e) {
65-
debugLog(`Error parsing '${version}'`, e)
65+
debugLog(`Error parsing '${version}':\n`, e)
6666
}
6767
}
6868
return null

src/utils/serialize-result-json.mts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function serializeResultJson(data: CResult<unknown>): string {
1313
'There was a problem converting the data set to JSON. The JSON was not an object. Please try again without --json'
1414
debugLog('typeof data=', typeof data)
1515
if (typeof data !== 'object' && data) {
16-
debugLog('data:', data)
16+
debugLog('data:\n', data)
1717
}
1818
return (
1919
JSON.stringify({
@@ -27,8 +27,7 @@ export function serializeResultJson(data: CResult<unknown>): string {
2727
try {
2828
return JSON.stringify(data, null, 2).trim() + '\n'
2929
} catch (e) {
30-
debugLog('Error:')
31-
debugLog(e)
30+
debugLog('Error:\n', e)
3231
process.exitCode = 1
3332
// This could be caused by circular references, which is an "us" problem
3433
const msg =

0 commit comments

Comments
 (0)