Skip to content

Commit c112faf

Browse files
authored
Remove check for interactive mode in labs installer (#3709)
## 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. The `askWorkspaceProfile` function 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.
1 parent 8313404 commit c112faf

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

cmd/labs/project/installer.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,6 @@ func (i *installer) recordVersion(ctx context.Context) error {
168168
}
169169

170170
func (i *installer) login(ctx context.Context) (*databricks.WorkspaceClient, error) {
171-
if !cmdio.IsPromptSupported(ctx) {
172-
log.Debugf(ctx, "Skipping workspace profile prompts in non-interactive mode")
173-
return nil, nil
174-
}
175171
cfg, err := i.metaEntrypoint(ctx).validLogin(i.cmd)
176172
if errors.Is(err, ErrNoLoginConfig) {
177173
cfg, err = i.Installer.envAwareConfig(ctx)

0 commit comments

Comments
 (0)