fix: use process.env.CLI_VERSION to avoid conflicts with NODE_ENV (#139)

This commit is contained in:
Brandon Keiji 2025-04-23 22:49:18 +00:00 committed by GitHub
parent 72d0b73598
commit 94c04955c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 5 deletions

View File

@ -25,9 +25,7 @@ async function main() {
if (process.stdin.isTTY && input?.length === 0) {
const readUpResult = await readPackageUp({ cwd: __dirname });
const cliVersion =
process.env.NODE_ENV === 'development'
? 'local'
: (readUpResult?.packageJson.version ?? 'unknown');
process.env.CLI_VERSION || readUpResult?.packageJson.version || 'unknown';
render(
React.createElement(App, {

View File

@ -24,8 +24,8 @@ if scripts/sandbox_command.sh -q; then
else
echo "WARNING: OUTSIDE SANDBOX. See README.md to enable sandboxing."
if [ -n "${DEBUG:-}" ]; then
NODE_ENV='development' node --inspect-brk node_modules/@gemini-code/cli "$@"
CLI_VERSION='development' node --inspect-brk node_modules/@gemini-code/cli "$@"
else
NODE_ENV='development' node node_modules/@gemini-code/cli "$@"
CLI_VERSION='development' node node_modules/@gemini-code/cli "$@"
fi
fi