Skip to content

Commit

Permalink
Revert using IsPromptSupported from promptOrAssignDefaultValues (#1077)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
andrewnester authored Dec 19, 2023
1 parent 5991e33 commit f18094d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libs/template/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f18094d

Please sign in to comment.