Really fix WSL/SSH detection for AuthWorkflow#1374
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1374 +/- ##
==========================================
+ Coverage 88.54% 88.55% +0.01%
==========================================
Files 54 54
Lines 3655 3657 +2
==========================================
+ Hits 3236 3238 +2
Misses 289 289
Partials 130 130
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR corrects the logic that detects “remote host” environments (SSH/WSL) so the default OIDC AuthWorkflow selection behaves as documented, and bumps the release to v2.2.4 after the v2.2.3 fix proved insufficient.
Changes:
- Treat WSL and SSH as a single “remote host” signal (
prompt.IsRemoteHost) and remove the separate WSL check at call sites. - Default
AuthWorkflowtodevice_codeduring settings load when running in a remote host environment and the setting is not configured. - Bump version to 2.2.4 and document the fix in the changelog.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Makefile | Bumps PROJECT_VERSION to 2.2.4. |
| internal/sso/settings.go | Applies remote-host-aware defaulting for AuthWorkflow during settings load. |
| internal/sso/settings_test.go | Attempts to make settings tests independent of SSH/WSL env vars. |
| internal/sso/auth/awssso_auth.go | Simplifies workflow selection to rely on IsRemoteHost() only. |
| internal/prompt/remote_host.go | Consolidates SSH + WSL detection into IsRemoteHost() and removes IsWSL(). |
| internal/prompt/remote_host_test.go | Updates tests to validate consolidated remote host detection. |
| cmd/aws-sso/setup_wizard_cmd.go | Updates wizard logic to use consolidated IsRemoteHost() check. |
| CHANGELOG.md | Adds v2.2.4 entry and updates “Unreleased” compare link. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e833834 to
a36cb0c
Compare
Yeah, I goofed. 2.2.3 didn't fix it.
a36cb0c to
db30d56
Compare
Yeah, I goofed. 2.2.3 didn't fix it.