synfinatic / aws-sso-cli

A powerful tool for using AWS Identity Center for the CLI and web console.
https://synfinatic.github.io/aws-sso-cli/
GNU General Public License v3.0
458 stars 57 forks source link

fix crash due to go variable context change #1056

Closed synfinatic closed 1 week ago

synfinatic commented 1 week ago

Go v1.22 changes how variables are shadowed which was causing ListAccounts() to return an empty list

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 84.43%. Comparing base (60c56c4) to head (8687d9e). Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/sso/awssso.go 0.00% 2 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/synfinatic/aws-sso-cli/pull/1056/graphs/tree.svg?width=650&height=150&src=pr&token=F8454GS4HS&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Aaron+Turner)](https://app.codecov.io/gh/synfinatic/aws-sso-cli/pull/1056?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Aaron+Turner) ```diff @@ Coverage Diff @@ ## main #1056 +/- ## ======================================= Coverage 84.43% 84.43% ======================================= Files 35 35 Lines 3037 3037 ======================================= Hits 2564 2564 Misses 380 380 Partials 93 93 ``` | [Flag](https://app.codecov.io/gh/synfinatic/aws-sso-cli/pull/1056/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Aaron+Turner) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/synfinatic/aws-sso-cli/pull/1056/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Aaron+Turner) | `84.43% <0.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Aaron+Turner#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/synfinatic/aws-sso-cli/pull/1056?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Aaron+Turner) | Coverage Δ | | |---|---|---| | [internal/sso/awssso.go](https://app.codecov.io/gh/synfinatic/aws-sso-cli/pull/1056?src=pr&el=tree&filepath=internal%2Fsso%2Fawssso.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Aaron+Turner#diff-aW50ZXJuYWwvc3NvL2F3c3Nzby5nbw==) | `72.49% <0.00%> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/synfinatic/aws-sso-cli/pull/1056?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Aaron+Turner). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Aaron+Turner) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/synfinatic/aws-sso-cli/pull/1056?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Aaron+Turner). Last update [60c56c4...8687d9e](https://app.codecov.io/gh/synfinatic/aws-sso-cli/pull/1056?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Aaron+Turner). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Aaron+Turner).