Skip to content

Commit 982cdec

Browse files
committed
docs(packer): tighten packerInitSupportsTemplate comment
1 parent d2fbe95 commit 982cdec

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

modules/packer/packer.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,8 @@ func packerInit(t testing.TestingT, ctx context.Context, options *Options) error
318318
return err
319319
}
320320

321-
// packerInitSupportsTemplate reports whether `packer init` applies to the configured template. init supports HCL2
322-
// templates, which can be either a single .hcl file (for example foo.pkr.hcl) or a directory holding HCL2 templates.
323-
// Legacy JSON templates are not supported. Template paths are resolved relative to WorkingDir, matching how packer is
324-
// invoked.
321+
// packerInitSupportsTemplate reports whether `packer init` applies to the template: an .hcl file or a directory of HCL2
322+
// templates, but not legacy JSON. The path is resolved relative to WorkingDir, matching how packer is invoked.
325323
func packerInitSupportsTemplate(options *Options) bool {
326324
if filepath.Ext(options.Template) == ".hcl" {
327325
return true

0 commit comments

Comments
 (0)