Commit 736851b
fix: workspace current / list must honor --workspace override (PLA-1590)
Both commands read the persisted workspace directly via
`f.Config.GetContext().GetWorkspace()`, so a `--workspace foo` override
was silently ignored — `workspace current` reported the persisted
workspace and `workspace list` put `*` on the persisted row, not on
the override. Caught running the Bucket 6 dev-2 E2E:
$ /tmp/zeabur-dev2 workspace switch team-A
$ /tmp/zeabur-dev2 --workspace team-B workspace current
team-A [...] team ... # wrong — override was team-B
This is the same class of bug as the deploy.go F1 finding from the
panel review: display source must match the resolved source the rest
of the command sees. Switch both commands to `f.CurrentWorkspace()` /
`f.CurrentOwnerID()` so they reflect the effective workspace for the
invocation. Existing `TestFactory_CurrentOwnerID_OverrideBeatsPersisted`
covers the underlying helper; this fix is the consumer side.
Verified on dev-2 against api-2.zeabur.dev:
$ /tmp/zeabur-dev2 --workspace pla1230 workspace current
pla1230-probe-... [69e72943...] team Administrator # ✓
$ /tmp/zeabur-dev2 --workspace pla1230 workspace list
* 69e72943... pla1230-probe-... team Administrator # ✓ marker on override
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b97244f commit 736851b
2 files changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| |||
0 commit comments