Skip to content

Honor --profile in profiles show and list - #2

Closed
manyoneek wants to merge 2 commits into
mainfrom
fix/profile-flag-precedence
Closed

manyoneek wants to merge 2 commits into
mainfrom
fix/profile-flag-precedence

Conversation

@manyoneek

@manyoneek manyoneek commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Pass the --profile value to the profile resolver in profiles show and profiles list.

Both handlers currently drop rt.Globals.Profile, so the saved active profile wins. An explicit positional name in profiles show keeps its existing precedence.

Explainer

cli-profile-explainer.mp4

Verification

  • A source-built CLI runs the same six commands before and after the patch: 4 passed / 2 failed → 6 passed.
  • The six focused regression cases pass with the fix.
  • The full internal/cli package and go vet pass.
  • The separate full-repository baseline failed with an unrelated panic in internal/tui.

Tested on macOS arm64 with disposable local profiles and no backend calls. Windows and Linux were not tested. Run bash build-and-run.sh from the source archive to repeat the check.

Build, test commands and reproduction files

Tested October 20, 2026 against RevenueCat/cli, commit 836cf0db6031. Fix: 9a70ead013dd.

go test ./internal/cli -run TestProfilesRespectProfileFlag -count=1
go test ./internal/cli -count=1
go vet ./internal/cli

Source and evidence

Runnable source · logs and dependency locks

Screenshots: before · after. Videos: before · after.

When this started

The bug has been present since these commands were added in 9abca4255e10, dated May 15, 2026. It reached the default branch through foundation PR #5 on July 29, 2026 (merge 9ecfe4a493a07f56f70aefbb03e1b6aa88b25c96). First affected release tag: v0.1.0.

How the introduction was verified

A binary built from the introducing commit reproduces both failures; all four controls pass. Its parent did not have these commands. The release tag was identified from Git; a packaged release binary was not tested.

Fixes #1.

@manyoneek

Copy link
Copy Markdown
Owner Author

Continued in RevenueCat#200 with the latest upstream baseline, the same regression tests, and fresh before/after CLI captures. The original evidence remains preserved.

@manyoneek manyoneek closed this Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

profiles show and list ignore --profile

1 participant