Skip to content

Commit 5c74609

Browse files
committed
Fix auth prompt logic for SDK v0.126.0 host-type changes
The SDK removed host-type validation from NewAccountClient/NewWorkspaceClient in favor of host metadata resolution. This broke the CLI's auth prompt logic which relied on ErrNotAccountClient/ErrNotWorkspaceClient sentinels. Fixes: - Use cfg.HostType() instead of cfg.ConfigType() to detect wrong host type, with explicit handling for UnifiedHost - Synthesize ErrNotAccountClient/ErrNotWorkspaceClient when the config is for the wrong host type and prompting is unavailable, preserving the MustAnyClient fallthrough and giving actionable errors - Add tests for wrong-type configs with prompting disabled - Fix noNetworkTransport comment and MustAnyClient comment Also fix whitespace in generated environments.go. Co-authored-by: Isaac
1 parent 967eccb commit 5c74609

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

cmd/workspace/environments/environments.go

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)