command: don't prompt for state migration if TF_INPUT is set
The "confirm" method was directly checking the meta struct's input field, but that only represents the -input command line flag, and doesn't respect the TF_INPUT environment variable. By calling the Input method instead, we check both. This fixes #15338.
This commit is contained in:
parent
dc53528350
commit
3df164502a
|
@ -402,8 +402,8 @@ func (m *Meta) uiHook() *UiHook {
|
|||
|
||||
// confirm asks a yes/no confirmation.
|
||||
func (m *Meta) confirm(opts *terraform.InputOpts) (bool, error) {
|
||||
if !m.input {
|
||||
return false, errors.New("input disabled")
|
||||
if !m.Input() {
|
||||
return false, errors.New("input is disabled")
|
||||
}
|
||||
for {
|
||||
v, err := m.UIInput().Input(opts)
|
||||
|
|
Loading…
Reference in New Issue