Skip to content

Commit

Permalink
Merge pull request #285 from github-vincent-miszczak/fix-working-dire…
Browse files Browse the repository at this point in the history
…ctory

fix(tfctl): show plan current working directory
  • Loading branch information
Chanwit Kaewkasi authored Aug 9, 2022
2 parents 6000e8b + fc2a9c0 commit 7e62fa9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tfctl/show_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ func (c *CLI) ShowPlan(out io.Writer, resource string) error {
return fmt.Errorf("failed to write plan: %w", err)
}

tf, err := tfexec.NewTerraform(tmpDir, c.terraform)
wd, err := os.Getwd()
if err != nil {
return fmt.Errorf("failed to get current working directory: %w", err)
}

tf, err := tfexec.NewTerraform(wd, c.terraform)
if err != nil {
return fmt.Errorf("failed to create Terraform instance: %w", err)
}
Expand Down

0 comments on commit 7e62fa9

Please sign in to comment.