From 02adf2577f7b947838c6b89f4385c76c31b8229b Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Thu, 21 Oct 2021 15:47:19 +0200 Subject: [PATCH] File provisioner, don't fail when no content is passed. --- provisioner/file/provisioner.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/provisioner/file/provisioner.go b/provisioner/file/provisioner.go index 7a8915c2d6e..b0f16c634f9 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."))