Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With Gum v0.14.5,
--defaultis a boolean whose explicit value is decoded through Kong’sstrconv.ParseBoolmapper; the Go documentation lists accepted false values as0,f, andfalse, notno. Consequently--default=nois rejected before the TUI opens, and the surrounding|| rc=$?silently converts that parse failure into a negative answer. During interactive installs, every default-no prompt—including Cognito, Telegram, AWS CLI updates, quota requests, and some continue/abort paths—therefore becomes impossible to accept; pass--default=falseinstead.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks — but this is a false positive, and gum's own error message is the disproof.
Gum does not use Kong's stock
strconv.ParseBoolmapper for this flag; it registers a custom bool mapper. Feeding it a value that mapper rejects makes it enumerate exactly what it accepts:So the accepted set is
true, 1, yes, false, 0, no—yesandnoare valid, whiletandfare the values that get rejected. That is the inverse of whatstrconv.ParseBoolwould do, which is what makes the ParseBool premise identifiable as the wrong model here.Probed across the full range on gum v0.14.5 (
linux/arm64), capturing stderr:nofalse0yestrue1ftTwo further points against the finding as written:
yes/nowere rejected, the pre-existing--default=yeson the affirmative branch — untouched by this PR and shipping for many releases — would have been silently broken the whole time, turning everydefault_yesprompt negative. That has not been observed.rcreflects the user's real choice.--default=falsewould also work and is equivalent; I'm keepingnobecause it reads symmetrically against the existing--default=yeson the adjacent branch. No code change.Note the exit code alone cannot settle this:
gum confirmreturns 1 for every flag combination when it has no TTY, so a non-interactive exit-code probe is not valid evidence. The parse error on stderr is, because argument parsing happens before the TUI opens.