func checkPlanFileExists()

in setuptest/apply.go [112:123]


func checkPlanFileExists(opts *terraform.Options) (*terraform.Options, error) {
	if _, err := os.Stat(filepath.Join(opts.TerraformDir, opts.PlanFilePath)); err != nil {
		if !os.IsNotExist(err) {
			return nil, err
		}
		newopts := new(terraform.Options)
		*newopts = *opts
		newopts.PlanFilePath = ""
		return newopts, nil
	}
	return opts, nil
}