Merge pull request #12433 from hashicorp/jbardin/extra-args

missing args assignment after parsing flags
This commit is contained in:
James Bardin 2017-03-09 11:03:56 -05:00 committed by GitHub
commit 200d5787ca
2 changed files with 11 additions and 0 deletions

View File

@ -64,6 +64,16 @@ func TestEnv_createAndList(t *testing.T) {
defer os.RemoveAll(td)
defer testChdir(t, td)()
// make sure a vars file doesn't interfere
err := ioutil.WriteFile(
DefaultVarsFilename,
[]byte(`foo = "bar"`),
0644,
)
if err != nil {
t.Fatal(err)
}
newCmd := &EnvNewCommand{}
envs := []string{"test_a", "test_b", "test_c"}

View File

@ -19,6 +19,7 @@ func (c *EnvListCommand) Run(args []string) int {
return 1
}
args = cmdFlags.Args()
configPath, err := ModulePath(args)
if err != nil {
c.Ui.Error(err.Error())