Commit 6da414b
authored
Fix labs installer to work in non-interactive mode with env var auth (#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.1 parent 739a132 commit 6da414b
2 files changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
374 | 381 | | |
375 | 382 | | |
376 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
| |||
0 commit comments