Skip to content

Commit 5a26e9d

Browse files
committed
fix(scan github): don't print success counts when returning blocking error
Before: on rate-limit / auth abort, the function emitted "N GitHub repos processed / 0 with supported Manifest files" followed by logger.fail(...). The success lines implied partial progress even though we're about to return ok:false, which is confusing output. Move the success counters past the blocking-error return so they only print on actual completion.
1 parent 627ffc0 commit 5a26e9d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/cli/src/commands/scan/create-scan-from-github.mts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,14 @@ export async function createScanFromGithub({
148148
}
149149
}
150150

151-
logger.success(reposScanned, 'GitHub repos processed')
152-
logger.success(scansCreated, 'with supported Manifest files')
153-
154151
if (blockingError) {
155152
logger.fail(blockingError.message)
156153
return blockingError
157154
}
158155

156+
logger.success(reposScanned, 'GitHub repos processed')
157+
logger.success(scansCreated, 'with supported Manifest files')
158+
159159
// If every repo failed but not for a known-blocking reason, treat
160160
// the run as an error so scripts know something went wrong instead
161161
// of inferring success from an ok: true with 0 scans.

0 commit comments

Comments
 (0)