From 948ef1f6734a1567a8e9bec0820d3bb29e78ef1f Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Thu, 28 Oct 2021 21:50:32 +0200 Subject: [PATCH] File provisioner, don't fail when no content is passed. (#11349) --- provisioner/file/provisioner.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/provisioner/file/provisioner.go b/provisioner/file/provisioner.go index 7a8915c2d..b0f16c634 100644 --- a/provisioner/file/provisioner.go +++ b/provisioner/file/provisioner.go @@ -110,11 +110,6 @@ func (p *Provisioner) Prepare(raws ...interface{}) error { } } - if len(p.config.Sources) < 1 && p.config.Content == "" { - errs = packersdk.MultiErrorAppend(errs, - errors.New("source, sources or content must be specified.")) - } - if len(p.config.Sources) > 0 && p.config.Content != "" { errs = packersdk.MultiErrorAppend(errs, errors.New("source(s) conflicts with content."))