cli icon indicating copy to clipboard operation
cli copied to clipboard

Fix host and account ID resolution order in `auth login`

Open shreyas-goenka opened this issue 1 year ago • 2 comments

Changes

The auth login command today prefers a host URL / account-id specified in a profile before selecting the one explicitly provided by a user in the command line.

This PR fixes this bug and refactors the code to make it more linear and easy to read. Note that the same issue exists in the auth token command and is fixed here as well.

Tests

Unit tests, and manual testing.

shreyas-goenka avatar Apr 16 '24 16:04 shreyas-goenka

Note: This PR has been on hold until I can check the UI components are robust on Mac and Windows. We use a new feature of prompt UI here that we did not use before. Not urgent so I'll resume this once I get the chance.

shreyas-goenka avatar Jul 05 '24 09:07 shreyas-goenka

Note: I have removed the changes related to using prompt.Validate components from promptui since the library can sometimes be glitchy and I don't want to validate the UI right now. Evenually we will figure out a std library for all our prompting needs.

shreyas-goenka avatar Aug 13 '24 16:08 shreyas-goenka

@pietern Yeah, you are right. There are no changes to the account-id resolution order. I updated the PR description and title.

shreyas-goenka avatar Aug 14 '24 12:08 shreyas-goenka