Commit 5c74609
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: Isaac1 parent 967eccb commit 5c74609
1 file changed
+12
-12
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments