Merge pull request #2502 from hashicorp/b-var-ask

command: ask for input even if tfvars is set [GH-2161]
This commit is contained in:
Mitchell Hashimoto 2015-06-25 15:40:59 -07:00
commit 4ff8f94fd6
3 changed files with 3 additions and 3 deletions

View File

@ -190,7 +190,7 @@ func (m *Meta) InputMode() terraform.InputMode {
var mode terraform.InputMode
mode |= terraform.InputModeProvider
if len(m.variables) == 0 && m.autoKey == "" {
if len(m.variables) == 0 {
mode |= terraform.InputModeVar
mode |= terraform.InputModeVarUnset
}

View File

@ -158,7 +158,7 @@ func TestMetaInputMode_defaultVars(t *testing.T) {
t.Fatalf("err: %s", err)
}
if m.InputMode()&terraform.InputModeVar != 0 {
if m.InputMode()&terraform.InputModeVar == 0 {
t.Fatalf("bad: %#v", m.InputMode())
}
}

View File

@ -119,7 +119,7 @@ func TestPush_input(t *testing.T) {
"foo": "foo",
}
if !reflect.DeepEqual(client.UpsertOptions.Variables, variables) {
t.Fatalf("bad: %#v", client.UpsertOptions)
t.Fatalf("bad: %#v", client.UpsertOptions.Variables)
}
}