Skip to content

CI=TRUE (as set by Xcode Cloud) crashes eas commands with "GetEnv.NoBoolean: TRUE is not a boolean" #4978

In review

Description

@abhiramshaji-cyber

Build/Submit details page URL

N/A, this happens locally and in CI before any build or submit starts.

Summary

Hi team, hope you're doing well! When CI is set to anything other than exactly true, false, 1 or 0 (for example CI=TRUE, which Xcode Cloud sets and users can't override), most eas commands exit 1 with Error: GetEnv.NoBoolean: TRUE is not a boolean. before doing anything.

What the code is for. eas-cli reads CI to decide whether to show spinners, whether to default to non interactive mode, and what to report as run_from_ci. Those reads use boolish('CI', false) from getenv, which the package pins at 1.0.0. That version only accepts true, false, 1 and 0 exactly and throws on anything else.

Current behavior

  1. Xcode Cloud (or any shell) exports CI=TRUE.
  2. Any eas command that loads ora.ts imports it, and ora.ts line 19 runs const isCi = boolish('CI', false); at module load.
  3. getenv@1.0.0 throws GetEnv.NoBoolean for TRUE.
  4. The command exits 1 with only that error. eas --version still works.

Expected behavior. CI=TRUE and CI=True count as CI, and values like CI=yes or an empty CI= don't crash the CLI.

The same strict read shows up in six places:

Meanwhile ExperimentationContextField.ts#L16-L20 and update/utils.ts#L384 treat any non empty CI as CI, and commands/build/index.ts#L333 uses !process.env.CI. So the same CI value can mean different things depending on which file reads it.

flowchart LR
  A["CI=TRUE"] --> B["eas whoami"]
  B --> C["import ora.ts"]
  C --> D["boolish('CI', false) at load"]
  D --> E["getenv 1.0.0 throws NoBoolean"]
  E --> F["exit 1"]
Loading

ora.ts in packages/eas-cli/src

ora.ts and its functions in packages/eas-cli/src, Code view in Architect

Managed or bare?

Neither, it reproduces with no project at all (just eas whoami).

Environment

  • eas-cli 27.11.0 (installed fresh from npm into an empty folder with an empty HOME)
  • getenv 1.0.0 (as pinned by eas-cli)
  • Node v26.13.0, npm 11.20.0
  • macOS 26.6.2, darwin arm64

I didn't run expo-env-info or expo-doctor since no project is involved.

Error output

$ CI=TRUE eas whoami
    Error: GetEnv.NoBoolean: TRUE is not a boolean.
$ echo $?
1

With DEBUG=* the stack points at module load of ora.js:

    at Object.boolish (node_modules/getenv/index.js:70:15)
    at node_modules/getenv/index.js:84:27
    at Object.<anonymous> (node_modules/eas-cli/build/ora.js:19:35)

EXPO_DEBUG=true prints the same single error line.

Reproducible demo or steps to reproduce from a blank project

mkdir repro && cd repro
npm i eas-cli@27.11.0
CI=TRUE  npx eas whoami   # Error: GetEnv.NoBoolean: TRUE is not a boolean.
CI=True  npx eas whoami   # Error: GetEnv.NoBoolean: True is not a boolean.
CI=yes   npx eas whoami   # Error: GetEnv.NoBoolean: yes is not a boolean.
CI=      npx eas whoami   # Error: GetEnv.NoBoolean:  is not a boolean.
CI=true  npx eas whoami   # Not logged in (works)
CI=TRUE  npx eas --version # eas-cli/27.11.0 ... (works)

CI=1, CI=0, CI=false and unset all work as expected.

Prior art and a question

This looks like the same thing expo/expo#33486 hit in @expo/cli on Xcode Cloud. Thanks to stephenlacy for the getenv bump in expo/expo#36688 and to byCedric for landing it in expo/expo#36840. In that thread brentvatne mentioned wanting the same env logic reused in other packages "such as in eas cli", which is part of why I'm filing this here. More recently expo/expo#53019 by ramonclaudio moved @expo/cli, create-expo and expo-doctor to ci === '1' || ci?.toLowerCase() === 'true', so values like yes count as not CI instead of throwing.

Which would you prefer for eas-cli?

  1. One small helper with the #53019 check, used at all six sites above (this is what I'd suggest, since it matches what the other Expo tools now do and covers yes and empty too).
  2. Just bumping getenv to 2.x, which fixes TRUE/True but still throws (I checked 2.0.0) on yes and empty.

Should the three places that treat any non empty CI as CI stay as they are, or would you like them on the same helper? Happy to open a PR for whichever you prefer, and thanks so much for taking a look!

Activity

  1. self-assigned this
    on Nov 26, 2026
  2. added
    needs review
    on Nov 26, 2026
  3. abhiramshaji-cyber commented on Nov 27, 2026

    @abhiramshaji-cyber
    Author

    Hey @harpreetkbadhan, welcome and thanks so much for picking this up in #4983! Really nice to see a small isCI() helper with its own tests, and I especially liked the test that loads ora with CI=TRUE, since that load time read is the one that took down almost every command.

    I read through the diff against current main to check it against the list in the issue, in case it saves the reviewers a step:

    • CI=TRUE and CI=True count as CI, since isCI() trims and lowercases first.
    • ora.ts now calls isCI() at module load, so the crash path is gone.
    • I count six boolish('CI', false) calls in packages/eas-cli/src on main (ora.ts, flags.ts, createContext.ts, simulatorsLaunchHint.ts, workflow/run.ts, workflow/status.ts), and the PR swaps all six. None are left after it.
    • CI=yes and an empty CI= no longer throw either.

    isCI in #4983 and its callers

    isCI in #4983 with the function callers resolved statically, Functions view in Architect

    Two small things I wasn't sure about, just as questions:

    1. With this check, values like CI=no count as CI, while @expo/cli after fix(cli,create-expo,doctor): Stop failing on non-boolean CI values expo#53019 only counts 1 or true in any case. That matches the three eas-cli spots that already treat any non empty CI as CI, so it may well be the intended choice. @douglowder, do you have a preference between the two?
    2. Those three spots (ExperimentationContextField.ts, update/utils.ts and commands/build/index.ts) still read CI on their own, so CI=false counts as CI there but not in the six spots above. Would you like them on isCI() here too, or is that better as a separate change?

    Happy to leave the review to you all, and thanks again harpreetkbadhan for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

needs review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions