From 5f3316350db81d21f5507b2fd6125e2cd535c38e Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Tue, 22 Mar 2022 14:28:48 +0100 Subject: [PATCH] datasource remove unused secondary bool param --- hcl2template/types.datasource.go | 2 +- hcl2template/types.packer_config.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hcl2template/types.datasource.go b/hcl2template/types.datasource.go index 3deab8c71..839b804c6 100644 --- a/hcl2template/types.datasource.go +++ b/hcl2template/types.datasource.go @@ -62,7 +62,7 @@ func (ds *Datasources) Values() (map[string]cty.Value, hcl.Diagnostics) { return res, diags } -func (cfg *PackerConfig) startDatasource(dataSourceStore packer.DatasourceStore, ref DatasourceRef, secondaryEvaluation bool) (packersdk.Datasource, hcl.Diagnostics) { +func (cfg *PackerConfig) startDatasource(dataSourceStore packer.DatasourceStore, ref DatasourceRef) (packersdk.Datasource, hcl.Diagnostics) { var diags hcl.Diagnostics block := cfg.Datasources[ref].block diff --git a/hcl2template/types.packer_config.go b/hcl2template/types.packer_config.go index 8558add3b..a85ad9c1e 100644 --- a/hcl2template/types.packer_config.go +++ b/hcl2template/types.packer_config.go @@ -344,7 +344,7 @@ func (cfg *PackerConfig) evaluateDatasources(skipExecution bool) hcl.Diagnostics continue } - datasource, startDiags := cfg.startDatasource(cfg.parser.PluginConfig.DataSources, ref, false) + datasource, startDiags := cfg.startDatasource(cfg.parser.PluginConfig.DataSources, ref) diags = append(diags, startDiags...) if diags.HasErrors() { continue @@ -426,7 +426,7 @@ func (cfg *PackerConfig) recursivelyEvaluateDatasources(ref DatasourceRef, depen // If we've gotten here, then it means ref doesn't seem to have any further // dependencies we need to evaluate first. Evaluate it, with the cfg's full // data source context. - datasource, startDiags := cfg.startDatasource(cfg.parser.PluginConfig.DataSources, ref, true) + datasource, startDiags := cfg.startDatasource(cfg.parser.PluginConfig.DataSources, ref) if startDiags.HasErrors() { diags = append(diags, startDiags...) return dependencies, diags, shouldContinue