Skip to content

Commit

Permalink
🧹 Replace deprecated policy.BundleFromPaths
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Zunker <[email protected]>
  • Loading branch information
czunker committed Dec 12, 2023
1 parent f0d131a commit 9cd172c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion provisioner/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@ func (p *Provisioner) executeCnspec(ui packer.Ui, comm packer.Communicator) erro
if p.config.PolicyBundle != "" {
ui.Message("load policy bundle from: " + p.config.PolicyBundle)
var err error
policyBundle, err = policy.BundleFromPaths(p.config.PolicyBundle)
bundleLoader := policy.DefaultBundleLoader()
policyBundle, err = bundleLoader.BundleFromPaths(p.config.PolicyBundle)
if err != nil {
return errors.Wrap(err, "could not load policy bundle from "+p.config.PolicyBundle)
}
Expand Down

0 comments on commit 9cd172c

Please sign in to comment.