diff --git a/builder/azure/dtl/config.go b/builder/azure/dtl/config.go index f819c3fc3..59011aa3f 100644 --- a/builder/azure/dtl/config.go +++ b/builder/azure/dtl/config.go @@ -726,6 +726,10 @@ func assertRequiredParametersSet(c *Config, errs *packer.MultiError) { default: errs = packer.MultiErrorAppend(errs, fmt.Errorf("The managed_image_storage_account_type %q is invalid", c.ManagedImageStorageAccountType)) } + // Errs check to make the linter happy. + if errs != nil { + return + } } func assertManagedImageName(name, setting string) (bool, error) { diff --git a/provisioner/azure-dtlartifact/provisioner.go b/provisioner/azure-dtlartifact/provisioner.go index 93cc6b1c6..8baaf7b83 100644 --- a/provisioner/azure-dtlartifact/provisioner.go +++ b/provisioner/azure-dtlartifact/provisioner.go @@ -16,7 +16,6 @@ import ( "github.com/hashicorp/packer/common" "github.com/hashicorp/packer/helper/config" - "github.com/hashicorp/packer/provisioner" "github.com/hashicorp/packer/template/interpolate" ) @@ -62,9 +61,8 @@ type Config struct { } type Provisioner struct { - config Config - communicator packer.Communicator - guestCommands *provisioner.GuestCommands + config Config + communicator packer.Communicator } func (p *Provisioner) ConfigSpec() hcldec.ObjectSpec { return p.config.FlatMapstructure().HCL2Spec() } @@ -120,6 +118,9 @@ func (p *Provisioner) Provision(ctx context.Context, ui packer.Ui, comm packer.C } spnCloud, err := p.config.ClientConfig.GetServicePrincipalToken(ui.Say, p.config.ClientConfig.CloudEnvironment().ResourceManagerEndpoint) + if err != nil { + return err + } ui.Message("Creating Azure Resource Manager (ARM) client ...") azureClient, err := dtlBuilder.NewAzureClient( diff --git a/vendor/modules.txt b/vendor/modules.txt index d271b2ec5..f962cef80 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -175,6 +175,7 @@ github.com/bmatcuk/doublestar # github.com/c2h5oh/datasize v0.0.0-20171227191756-4eba002a5eae github.com/c2h5oh/datasize <<<<<<< HEAD +<<<<<<< HEAD # github.com/census-instrumentation/opencensus-proto v0.2.1 github.com/census-instrumentation/opencensus-proto/gen-go/agent/common/v1 github.com/census-instrumentation/opencensus-proto/gen-go/agent/metrics/v1 @@ -184,6 +185,8 @@ github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1 github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1 ======= >>>>>>> Updating the module dependencies +======= +>>>>>>> Fixing the linting errors # github.com/cheggaaa/pb v1.0.27 github.com/cheggaaa/pb # github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e