From cef3d42966181982d1756452281e8f657dfd8f50 Mon Sep 17 00:00:00 2001 From: John E Date: Fri, 21 Aug 2026 17:06:31 -0400 Subject: [PATCH] docs: fix some typos Signed-off-by: John E --- command/build_test.go | 4 ++-- command/hcl2_upgrade.go | 4 ++-- command/inspect_test.go | 2 +- hcl2template/formatter_test.go | 2 +- hcl2template/types.packer_config.go | 4 ++-- internal/hcp/env/env.go | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/command/build_test.go b/command/build_test.go index 565135f7aa2..24b81f0df63 100644 --- a/command/build_test.go +++ b/command/build_test.go @@ -382,7 +382,7 @@ func TestBuild(t *testing.T) { }, { - name: "hcl - valid cmd ( invalid varfile bypased )", + name: "hcl - valid cmd ( invalid varfile bypassed )", args: []string{ "-var-file", filepath.Join(testFixture("hcl", "validation", "map", "invalid_value.pkrvars.hcl")), "-var", `image_metadata={key = "new_value", something = { foo = "bar" }}`, @@ -392,7 +392,7 @@ func TestBuild(t *testing.T) { }, { - name: "hcl - invalid cmd ( valid varfile bypased )", + name: "hcl - invalid cmd ( valid varfile bypassed )", args: []string{ "-var-file", filepath.Join(testFixture("hcl", "validation", "map", "valid_value.pkrvars.hcl")), "-var", `image_metadata={key = "?", something = { foo = "wrong" }}`, diff --git a/command/hcl2_upgrade.go b/command/hcl2_upgrade.go index e1ccaed49a4..93350fe0e56 100644 --- a/command/hcl2_upgrade.go +++ b/command/hcl2_upgrade.go @@ -1056,10 +1056,10 @@ func (p *LocalsParser) Write(out *bytes.Buffer) { fmt.Fprintln(out, `locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") }`) } if isotime { - fmt.Fprintln(out, `# The "legacy_isotime" function has been provided for backwards compatability, but we recommend switching to the timestamp and formatdate functions.`) + fmt.Fprintln(out, `# The "legacy_isotime" function has been provided for backwards compatibility, but we recommend switching to the timestamp and formatdate functions.`) } if strftime { - fmt.Fprintln(out, `# The "legacy_strftime" function has been provided for backwards compatability, but we recommend switching to the timestamp and formatdate functions.`) + fmt.Fprintln(out, `# The "legacy_strftime" function has been provided for backwards compatibility, but we recommend switching to the timestamp and formatdate functions.`) } if len(p.LocalsOut) > 0 { if p.WithAnnotations { diff --git a/command/inspect_test.go b/command/inspect_test.go index 4eb5e1e49ec..d2cd361d8ad 100644 --- a/command/inspect_test.go +++ b/command/inspect_test.go @@ -179,7 +179,7 @@ and therefore only show in their raw form here. } actual := string(bs) if diff := cmp.Diff(tc.expected, actual); diff != "" { - t.Fatalf("unexpected ouput %s", diff) + t.Fatalf("unexpected output %s", diff) } }) } diff --git a/hcl2template/formatter_test.go b/hcl2template/formatter_test.go index 22f75466606..6aa5da22294 100644 --- a/hcl2template/formatter_test.go +++ b/hcl2template/formatter_test.go @@ -136,7 +136,7 @@ func TestHCL2Formatter_FormatNegativeCases(t *testing.T) { } if diags[0].Detail != "file testdata/format/test.json is not a HCL file" { - t.Fatalf("Expected error messge did not received") + t.Fatalf("Expected error message did not received") } } } diff --git a/hcl2template/types.packer_config.go b/hcl2template/types.packer_config.go index 4296c369232..fd5051c9d65 100644 --- a/hcl2template/types.packer_config.go +++ b/hcl2template/types.packer_config.go @@ -320,7 +320,7 @@ func (c *PackerConfig) recursivelyEvaluateLocalVariable(local *LocalBlock, depth return hcl.Diagnostics{&hcl.Diagnostic{ Severity: hcl.DiagError, Summary: "Max local recursion depth exceeded.", - Detail: "An error occured while recursively evaluating locals." + + Detail: "An error occurred while recursively evaluating locals." + "Your local variables likely have a cyclic dependency. " + "Please simplify your config to continue. ", }} @@ -429,7 +429,7 @@ func (cfg *PackerConfig) recursivelyEvaluateDatasources(ref DatasourceRef, depen diags = append(diags, &hcl.Diagnostic{ Severity: hcl.DiagError, Summary: "Max datasource recursion depth exceeded.", - Detail: "An error occured while recursively evaluating data " + + Detail: "An error occurred while recursively evaluating data " + "sources. Either your data source depends on more than ten " + "other data sources, or your data sources have a cyclic " + "dependency. Please simplify your config to continue. ", diff --git a/internal/hcp/env/env.go b/internal/hcp/env/env.go index 2c188a87f56..5e10c65b580 100644 --- a/internal/hcp/env/env.go +++ b/internal/hcp/env/env.go @@ -22,7 +22,7 @@ func HasHCPAuth() (bool, error) { return false, err } if hasClientCredentials && hasCertificate { - fmt.Printf("HCP Client Credentials (HCP_CLIENT_ID/HCP_CLIENT_SECRET environment variables) and certificate (HCP_CRED_FILE environment variable, or certificate located at default path (%s) are both supplied, only one is required. The HCP SDK will determine which authentication mechanism to configure here, it is reccomended to only configure one authentication method", HCPDefaultCredFilePathFull) + fmt.Printf("HCP Client Credentials (HCP_CLIENT_ID/HCP_CLIENT_SECRET environment variables) and certificate (HCP_CRED_FILE environment variable, or certificate located at default path (%s) are both supplied, only one is required. The HCP SDK will determine which authentication mechanism to configure here, it is recommended to only configure one authentication method", HCPDefaultCredFilePathFull) } return (hasClientCredentials || hasCertificate), nil }