mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-24 08:51:40 -04:00
backport of commit 1dfc1baddf
This commit is contained in:
@@ -4,8 +4,6 @@
|
||||
package null
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
registryimage "github.com/hashicorp/packer-plugin-sdk/packer/registry/image"
|
||||
)
|
||||
|
||||
@@ -26,7 +24,7 @@ func (*NullArtifact) Id() string {
|
||||
}
|
||||
|
||||
func (a *NullArtifact) String() string {
|
||||
return fmt.Sprintf("Did not export anything. This is the null builder")
|
||||
return "Did not export anything. This is the null builder"
|
||||
}
|
||||
|
||||
func (a *NullArtifact) State(name string) interface{} {
|
||||
|
||||
@@ -6,7 +6,6 @@ package command
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
"testing"
|
||||
@@ -101,7 +100,7 @@ func TestBuildParallel_1(t *testing.T) {
|
||||
}
|
||||
|
||||
args := []string{
|
||||
fmt.Sprintf("-parallel-builds=10"),
|
||||
"-parallel-builds=10",
|
||||
filepath.Join(testFixture("parallel"), "1lock-5wg.json"),
|
||||
}
|
||||
|
||||
@@ -130,7 +129,7 @@ func TestBuildParallel_2(t *testing.T) {
|
||||
}
|
||||
|
||||
args := []string{
|
||||
fmt.Sprintf("-parallel-builds=3"),
|
||||
"-parallel-builds=3",
|
||||
filepath.Join(testFixture("parallel"), "2lock-4wg.json"),
|
||||
}
|
||||
|
||||
@@ -159,7 +158,7 @@ func TestBuildParallel_Timeout(t *testing.T) {
|
||||
}
|
||||
|
||||
args := []string{
|
||||
fmt.Sprintf("-parallel-builds=3"),
|
||||
"-parallel-builds=3",
|
||||
filepath.Join(testFixture("parallel"), "2lock-timeout.json"),
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ func (ds *Datasources) Values() (map[string]cty.Value, hcl.Diagnostics) {
|
||||
for ref, datasource := range *ds {
|
||||
if datasource.value == (cty.Value{}) {
|
||||
diags = append(diags, &hcl.Diagnostic{
|
||||
Summary: fmt.Sprintf("empty value"),
|
||||
Summary: "empty value",
|
||||
Subject: &datasource.block.DefRange,
|
||||
Severity: hcl.DiagError,
|
||||
})
|
||||
@@ -73,7 +73,7 @@ func (cfg *PackerConfig) startDatasource(dataSourceStore packer.DatasourceStore,
|
||||
diags = append(diags, &hcl.Diagnostic{
|
||||
Summary: "Unknown " + dataSourceLabel + " type " + ref.Type,
|
||||
Subject: block.LabelRanges[0].Ptr(),
|
||||
Detail: fmt.Sprintf("packer does not currently know any data source."),
|
||||
Detail: "packer does not currently know any data source.",
|
||||
Severity: hcl.DiagError,
|
||||
})
|
||||
return nil, diags
|
||||
|
||||
@@ -67,8 +67,7 @@ func (p *Provisioner) Provision(ctx context.Context, ui packersdk.Ui, comm packe
|
||||
ui.Say("Pausing at breakpoint provisioner.")
|
||||
}
|
||||
|
||||
message := fmt.Sprintf(
|
||||
"Press enter to continue.")
|
||||
message := "Press enter to continue."
|
||||
|
||||
var g errgroup.Group
|
||||
result := make(chan string, 1)
|
||||
|
||||
Reference in New Issue
Block a user