Skip to content

Commit fc0bebf

Browse files
fix MACRO fallback (#146)
2 parents eca1acc + cd70c1b commit fc0bebf

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/entrypoints/cli.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
#!/usr/bin/env bun
22
import { feature } from 'bun:bundle'
33

4+
// Runtime fallback for MACRO.* when not injected by build/dev defines.
5+
// This happens when running cli.tsx directly (not via `bun run dev` or built dist/).
6+
if (typeof globalThis.MACRO === 'undefined') {
7+
;(globalThis as any).MACRO = {
8+
VERSION: process.env.CLAUDE_CODE_VERSION || '2.1.888',
9+
BUILD_TIME: new Date().toISOString(),
10+
FEEDBACK_CHANNEL: '',
11+
ISSUES_EXPLAINER: '',
12+
NATIVE_PACKAGE_URL: '',
13+
PACKAGE_URL: '',
14+
VERSION_CHANGELOG: '',
15+
}
16+
}
17+
418
// Bugfix for corepack auto-pinning, which adds yarnpkg to peoples' package.jsons
519
// eslint-disable-next-line custom-rules/no-top-level-side-effects
620
process.env.COREPACK_ENABLE_AUTO_PIN = '0'

0 commit comments

Comments
 (0)