From 571ca5a555fa7748a945942e6e3bccff6a34cfda Mon Sep 17 00:00:00 2001 From: Emily Hedlund Date: Thu, 23 Apr 2026 16:26:29 -0700 Subject: [PATCH] update FatalUntrustedWorkspaceError message to include doc link (#25874) --- docs/cli/trusted-folders.md | 4 ++++ packages/cli/src/utils/userStartupWarnings.ts | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/cli/trusted-folders.md b/docs/cli/trusted-folders.md index efb99ea397..cbcf5b7fd0 100644 --- a/docs/cli/trusted-folders.md +++ b/docs/cli/trusted-folders.md @@ -117,6 +117,10 @@ the following methods: These methods will trust the current workspace for the duration of the session without prompting. +For detailed instructions on managing folder trust within CI/CD workflows, +review the +[Gemini CLI trust guidance for GitHub Actions](https://github.com/google-github-actions/run-gemini-cli/blob/main/docs/trust-guidance.md). + ## Overriding the trust file location By default, trust settings are saved to `~/.gemini/trustedFolders.json`. If you diff --git a/packages/cli/src/utils/userStartupWarnings.ts b/packages/cli/src/utils/userStartupWarnings.ts index 78627df3e5..549b62f859 100644 --- a/packages/cli/src/utils/userStartupWarnings.ts +++ b/packages/cli/src/utils/userStartupWarnings.ts @@ -96,7 +96,9 @@ const folderTrustCheck: WarningCheck = { if (isHeadlessMode()) { throw new FatalUntrustedWorkspaceError( - 'Gemini CLI is not running in a trusted directory. To proceed, either use `--skip-trust`, set the `GEMINI_CLI_TRUST_WORKSPACE=true` environment variable, or trust this directory in interactive mode.', + 'Gemini CLI is not running in a trusted directory. To proceed, either use `--skip-trust`, ' + + 'set the `GEMINI_CLI_TRUST_WORKSPACE=true` environment variable, or trust this directory in interactive mode. ' + + 'For more details, see https://geminicli.com/docs/cli/trusted-folders/#headless-and-automated-environments', ); }