Revert using IsPromptSupported from promptOrAssignDefaultValues (#1077)

## Changes

Fixes nightly test `TestAccBundleInitErrorOnUnknownFields`. 

`TestAccBundleInitErrorOnUnknownFields` has an interactive shell by
default so the test fails on waiting for prompt.

This was introduced in #1069.

## Tests

Nightly test succeed.
This commit is contained in:
Andrew Nester 2023-12-19 10:58:46 +01:00 committed by GitHub
parent 5991e33ca7
commit f18094d943
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -212,7 +212,8 @@ func (c *config) promptForValues(r *renderer) error {
// Prompt user for any missing config values. Assign default values if
// terminal is not TTY
func (c *config) promptOrAssignDefaultValues(r *renderer) error {
if cmdio.IsPromptSupported(c.ctx) {
// TODO: replace with IsPromptSupported call (requires fixing TestAccBundleInitErrorOnUnknownFields test)
if cmdio.IsOutTTY(c.ctx) && cmdio.IsInTTY(c.ctx) {
return c.promptForValues(r)
}
return c.assignDefaultValues(r)