Remove check for interactive mode in labs installer#3709
Merged
Conversation
denik
approved these changes
Oct 2, 2025
Collaborator
9 failing tests:
|
alexott
approved these changes
Oct 2, 2025
pietern
added a commit
that referenced
this pull request
Oct 8, 2025
…3735) ## Changes When authentication is configured via environment variables, `askWorkspaceProfile()` was failing because it checked for a profile name instead of checking if auth is actually configured. This made labs installers fail when running from non-interactive terminals (Cursor, specifically). The fix makes `askWorkspaceProfile()` consistent with `askCluster()` and `askWarehouse()`, which both check if their values are already set before prompting. ## Why When running tests from Cursor, I saw the following failures after #3709: Failing Tests: * TestInstallerWorksForReleases * TestInstallerWorksForDevelopment Both tests fail with the error: ``` login: ask for workspace: profile: not in an interactive terminal ``` ## Tests The tests that previously failed on a non-interactive terminal now pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes
If this condition evaluates to true, it returns
(nil, nil)and leads to a panic further along in the code. The check for an interactive terminal is done earlier than necessary and can be removed altogether. TheaskWorkspaceProfilefunction also checks for an interactive terminal and returns an error if there isn't one.We mark Git Bash as a terminal where prompting is not supported (see #1069).
Fixes #3597.
Tests
Manually confirmed the installer no longer panics in Git Bash on Windows.