From f18094d9437b8ad05a34da70215477c30911c647 Mon Sep 17 00:00:00 2001 From: Andrew Nester Date: Tue, 19 Dec 2023 10:58:46 +0100 Subject: [PATCH] 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. --- libs/template/config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/template/config.go b/libs/template/config.go index b52c0ee8..a54d394d 100644 --- a/libs/template/config.go +++ b/libs/template/config.go @@ -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)