Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cargo-shuttle): fix init login bugs #1309

Merged
merged 3 commits into from Oct 9, 2023
Merged

Conversation

oddgrd
Copy link
Contributor

@oddgrd oddgrd commented Oct 9, 2023

Description of change

cargo-shuttle init was not authorizing the client in the event that the api-key was already set in the config. It was also the case that if passing certain args, the interactive flow was disabled, which meant if the user wasn't logged in and didn't pass --api-key in the command, they would get an error about trying to login but failing. I fixed that too, but it does mean the path prompt will be interactive even if given. The init logic is quite complicated, so I'm very open to suggestions here.

How has this been tested? (if applicable)

Tested running cargo run -p cargo-shuttle -- --wd ./ init --from https://github.com/shuttle-hq/eurorust-demo --name unique-name --create-env ./unique-name when logged in with config file, with --api-key, and neither.

@oddgrd oddgrd requested a review from jonaro00 October 9, 2023 07:51
Copy link
Member

@jonaro00 jonaro00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That scenario sounds very obscure, so it's fine. "When I have time," I want to rewrite the core logic on this, so it is less bug prone.

@oddgrd oddgrd merged commit 41ed35d into main Oct 9, 2023
33 checks passed
@oddgrd oddgrd deleted the feature/eng-1505-fix-init-bug branch October 9, 2023 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants