Repository navigation
bb uppercases flag values in every locale - #143
Merged
Merged
Conversation
bb_upper uppercased with tr, which follows the caller's locale. Under tr_TR.UTF-8, GNU tr maps i to i, so `--state declined` became DECLiNED and bb pr list rejected it. The tr now runs under LC_ALL=C. The Linux job generates tr_TR.UTF-8, because only GNU tr shows the bug. Closes #142 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The two hex lowercasings were the last case conversions in cli/bb that followed the caller's locale. The test reads CI only when it is "true", and the comments say that GNU tr leaves i unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #142
bb_upperuppercased withtr, which follows the caller's locale. Undertr_TR.UTF-8, GNUtrleavesiunchanged, so--state declinedbecameDECLiNEDandbb pr listrejected it. BSDtr(macOS) is not affected.Change
cli/bb:bb_upperrunstrunderLC_ALL=C, likebb_account_keysince bb gives one account key in every locale #139. The two lowercasings of the--match-head-commitSHAs (cli/bb:2368,:2383) getLC_ALL=Ctoo. They had no failing input, becauseIis no hex digit, but they were the last case conversions incli/bbthat followed the locale.tests/upper-locale.test.ts:bb pr list --state declinedunderLC_ALL=tr_TR.UTF-8sendsstate=DECLINED. WithCI=trueand no such locale, the test fails instead of skipping.bb-tests.yml: the Linux job runssudo locale-gen tr_TR.UTF-8and lists the result. The Ubuntu runner does not ship that locale.working-with-bitbucket-api.Checks
node:20-bookwormwithlocales-all): the new test fails onmainwithinvalid --state 'DECLiNED'and passes on this branch.pnpm testinskills/working-with-bitbucket-api/tests/gives 463 pass, 0 fail, 1 skipped, with bash 5 and with/bin/bash3.2.57. Onlybb-tests-linuxcan fail on the new test.pnpm testandpnpm run validateat the root: pass.🤖 Generated with Claude Code