Skip to content

Commit d2dc5ac

Browse files
committed
fix(env): convert CI to boolean and fix type comparison
- Convert ENV.CI to boolean using envAsBoolean (consistent with VITEST) - Fix cli-entry.mts to use boolean comparison instead of string comparison - Fixes TypeScript error: "This comparison appears to be unintentional because the types 'boolean' and 'string' have no overlap" - Both ENV.VITEST and ENV.CI are now properly typed as booleans
1 parent 87e7664 commit d2dc5ac

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/cli/src/cli-entry.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void (async () => {
5353
const registryUrl = lookupRegistryUrl()
5454

5555
// Skip update checks in test environments.
56-
if (ENV.VITEST !== '1' && ENV.CI !== 'true') {
56+
if (!ENV.VITEST && !ENV.CI) {
5757
// Unified update notifier handles both SEA and npm automatically.
5858
await scheduleUpdateCheck({
5959
authInfo: lookupRegistryAuthToken(registryUrl, { recursive: true }),

packages/cli/src/env/ci.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@
55

66
import { env } from 'node:process'
77

8-
export const CI = env['CI']
8+
import { envAsBoolean } from '@socketsecurity/lib/env'
9+
10+
export const CI = envAsBoolean(env['CI'])

0 commit comments

Comments
 (0)