From fb0db2dfd6ff4150150c2a7b88442da5625cd609 Mon Sep 17 00:00:00 2001 From: Allen Hutchison Date: Fri, 25 Jul 2025 09:39:37 -0700 Subject: [PATCH] adh/bugfix/1563 (#4822) --- esbuild.config.js | 6 ++++++ packages/cli/src/patches/is-in-ci.ts | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 packages/cli/src/patches/is-in-ci.ts diff --git a/esbuild.config.js b/esbuild.config.js index 846fb684..b7c7e56e 100644 --- a/esbuild.config.js +++ b/esbuild.config.js @@ -21,6 +21,12 @@ esbuild outfile: 'bundle/gemini.js', platform: 'node', format: 'esm', + alias: { + 'is-in-ci': path.resolve( + __dirname, + 'packages/cli/src/patches/is-in-ci.ts', + ), + }, define: { 'process.env.CLI_VERSION': JSON.stringify(pkg.version), }, diff --git a/packages/cli/src/patches/is-in-ci.ts b/packages/cli/src/patches/is-in-ci.ts new file mode 100644 index 00000000..a37c8678 --- /dev/null +++ b/packages/cli/src/patches/is-in-ci.ts @@ -0,0 +1,17 @@ +/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +// This is a replacement for the `is-in-ci` package that always returns false. +// We are doing this to avoid the issue where `ink` does not render the UI +// when it detects that it is running in a CI environment. +// This is safe because `ink` (and thus `is-in-ci`) is only used in the +// interactive code path of the CLI. +// See issue #1563 for more details. + +const isInCi = false; + +// eslint-disable-next-line import/no-default-export +export default isInCi;