From b902e2d30b51525870f08e62b5ece47c5a2f44f0 Mon Sep 17 00:00:00 2001 From: Jonathan Gold Date: Thu, 6 Dec 2018 05:35:29 -0500 Subject: [PATCH] engine: resources: file: Fix bug preventing use of source field This patch fixes a previously undiscovered bug which prevented the use of the source field in the file resource. CheckApply was returning early if obj.Content was nil. It is also necessary to check that obj.Source is empty before returning, otherwise syncCheckApply never runs. --- engine/resources/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/resources/file.go b/engine/resources/file.go index 76ff5b6b..723e3c50 100644 --- a/engine/resources/file.go +++ b/engine/resources/file.go @@ -608,7 +608,7 @@ func (obj *FileRes) contentCheckApply(apply bool) (checkOK bool, _ error) { } // content is not defined, leave it alone... - if obj.Content == nil { + if obj.Content == nil && obj.Source == "" { return true, nil }