gemini-cli - 💡(How to fix) Fix Overly paternalistic censorship/gate-keeping. Refused to give link to tldp.org [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#25229Fetched 2026-04-13 05:45:39
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
labeled ×2

Error Message

By using && inside the function (as we did in the fix), you've made the error handling explicit and "immune" to how the function is called from the outside.

RAW_BUFFERClick to expand / collapse

What happened?

<img width="2122" height="238" alt="Image" src="https://github.com/user-attachments/assets/8e3c3742-05ed-42a6-adbe-8409ba05309d" />

By using && inside the function (as we did in the fix), you've made the error handling explicit and "immune" to how the function is called from the outside. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

I didn't know this: In Bash, set -e is "contagious." If a function is called as part of a && or || test, Bash reaches inside the function and disables set -e for the duration of that call. Can you link to a bash tldp web page that describes this behavior so I can read more about it? ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄

⚠️ Response stopped due to prohibited content.

Parts of the generated bug report history that reveal information about my configuration have been either modified or deleted. bug-report-history-1776020704485.json

What did you expect to happen?

I expected it to give me a link to bash tldp so I could educate myself about a corner case of the set builtin in bash I had not fully considered.

Client information

  • CLI Version: 0.36.0
  • Git Commit: 8b1e649c26
  • Session ID: de9f9c8c-2031-4049-aee9-2fcd2bba96c8
  • Operating System: linux v25.9.0
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-3
  • Auth Type: oauth-personal
  • Memory Usage: 508.3 MB
  • Terminal Name: tmux 3.6a
  • Terminal Background: #ffffff
  • Kitty Keyboard Protocol: Unsupported

Login information

Google Account

Anything else we need to know?

No response

extent analysis

TL;DR

The issue can be resolved by using the set -e flag correctly in Bash scripts and understanding its behavior with && and || operators.

Guidance

  • Review the Bash documentation on the set builtin to understand how set -e works and its interaction with logical operators.
  • Verify that the set -e flag is used consistently throughout the script to ensure error handling is explicit and reliable.
  • Check the Bash manual or online resources, such as the Bash Reference Manual, for information on the behavior of set -e with && and || operators.
  • Consider testing the script with different scenarios to ensure the error handling behaves as expected.

Example

No specific code example is provided due to the lack of detailed code context in the issue.

Notes

The issue seems to be related to the understanding of Bash's set -e behavior, and resolving it requires reviewing the documentation and testing the script thoroughly.

Recommendation

Apply workaround by carefully reviewing and adjusting the use of set -e in the script to ensure correct error handling, as the root cause appears to be related to its usage and understanding.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

gemini-cli - 💡(How to fix) Fix Overly paternalistic censorship/gate-keeping. Refused to give link to tldp.org [1 participants]