fix: use process.env.CLI_VERSION to avoid conflicts with NODE_ENV (#139)
This commit is contained in:
parent
72d0b73598
commit
94c04955c8
|
@ -25,9 +25,7 @@ async function main() {
|
||||||
if (process.stdin.isTTY && input?.length === 0) {
|
if (process.stdin.isTTY && input?.length === 0) {
|
||||||
const readUpResult = await readPackageUp({ cwd: __dirname });
|
const readUpResult = await readPackageUp({ cwd: __dirname });
|
||||||
const cliVersion =
|
const cliVersion =
|
||||||
process.env.NODE_ENV === 'development'
|
process.env.CLI_VERSION || readUpResult?.packageJson.version || 'unknown';
|
||||||
? 'local'
|
|
||||||
: (readUpResult?.packageJson.version ?? 'unknown');
|
|
||||||
|
|
||||||
render(
|
render(
|
||||||
React.createElement(App, {
|
React.createElement(App, {
|
||||||
|
|
|
@ -24,8 +24,8 @@ if scripts/sandbox_command.sh -q; then
|
||||||
else
|
else
|
||||||
echo "WARNING: OUTSIDE SANDBOX. See README.md to enable sandboxing."
|
echo "WARNING: OUTSIDE SANDBOX. See README.md to enable sandboxing."
|
||||||
if [ -n "${DEBUG:-}" ]; then
|
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
|
else
|
||||||
NODE_ENV='development' node node_modules/@gemini-code/cli "$@"
|
CLI_VERSION='development' node node_modules/@gemini-code/cli "$@"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
Loading…
Reference in New Issue