Skip to content

Commit 423fdb2

Browse files
committed
perf(cli): defer registryUrl lookup until needed
Only lookup registry URL when update checks are enabled (i.e., not in test/CI environments). Minor startup optimization.
1 parent b4119f1 commit 423fdb2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/cli/src/cli-entry.mts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,9 @@ import { scheduleUpdateCheck } from './utils/update/manager.mts'
5151
const __filename = fileURLToPath(import.meta.url)
5252

5353
void (async () => {
54-
const registryUrl = lookupRegistryUrl()
55-
5654
// Skip update checks in test environments.
5755
if (!ENV.VITEST && !ENV.CI) {
56+
const registryUrl = lookupRegistryUrl()
5857
// Unified update notifier handles both SEA and npm automatically.
5958
await scheduleUpdateCheck({
6059
authInfo: lookupRegistryAuthToken(registryUrl, { recursive: true }),

0 commit comments

Comments
 (0)