fix: skip hosting selection prompt when --domain flag is explicitly set #110
+16
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description 📣
Fixes an issue where running
infisical login --domain "https://eu.infisical.com"still prompts the user to select a hosting option, even though the domain was explicitly specified via the flag.Problem: When using
--domainwith EU/US cloud URLs, the CLI would still show the interactive hosting selection prompt:This made it impossible to script the login flow (e.g., for terraform plan) without human input.
Solution: Check if the
--domainflag was explicitly set by the user. If so, use that domain directly without prompting, even for US/EU cloud URLs.Type ✨
Tests 🛠️
Manual verification:
infisical login --domain "https://eu.infisical.com"should skip the hosting selection promptinfisical login(without --domain) should still show the hosting selection prompt as beforeKey areas for review:
shouldUsePresetDomainconditionLink to Devin run: https://app.devin.ai/sessions/f8e999bcf9bd49f5912415d268f52bce
Requested by: Vlad Matsiiako (@vmatsiiako)