From a2419dbfc2732ba4458c4cac84049155f082198e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 4 Jan 2017 21:11:05 -0500 Subject: [PATCH] Hide errors from FilesEntity.Apply to match upstream. https://github.com/holocm/holo/issues/19 --- src/holocm.org/plugins/files/entity.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/holocm.org/plugins/files/entity.go b/src/holocm.org/plugins/files/entity.go index 4b7f285..579d6ce 100644 --- a/src/holocm.org/plugins/files/entity.go +++ b/src/holocm.org/plugins/files/entity.go @@ -111,13 +111,17 @@ func (target *FilesEntity) EntityUserInfo() (r []holo.KV) { } func (target *FilesEntity) Apply(withForce bool, stdout, stderr io.Writer) holo.ApplyResult { + // BUG(lukeshu): FilesEntity.Apply: We hide errors here to + // match the upstream behavior of holo-files: + // https://github.com/holocm/holo/issues/19 if target.orphaned { errs := target.handleOrphanedTargetBase() if len(errs) > 0 { for _, err := range errs { fmt.Fprintf(stderr, "!! %s\n", err.Error()) } - return holo.NewApplyError(errs[0]) + //return holo.NewApplyError(errs[0]) + return holo.ApplyApplied } return holo.ApplyApplied } else { @@ -125,7 +129,8 @@ func (target *FilesEntity) Apply(withForce bool, stdout, stderr io.Writer) holo. if err != nil { fmt.Fprintf(stderr, "!! %s\n", err.Error()) - return holo.NewApplyError(err) + //return holo.NewApplyError(err) + return holo.ApplyApplied } return result