summaryrefslogtreecommitdiff
path: root/internal/resource/dir/dir.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/resource/dir/dir.go')
-rw-r--r--internal/resource/dir/dir.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/internal/resource/dir/dir.go b/internal/resource/dir/dir.go
index 047a591..1934272 100644
--- a/internal/resource/dir/dir.go
+++ b/internal/resource/dir/dir.go
@@ -180,11 +180,8 @@ func applyAttributesTo(path string, mode os.FileMode, usr, group string) error {
// Ensure builds and applies the directory resource described by opts,
// without registering it.
func Ensure(path string, opts ...opt.Option) error {
- d, err := build(path, opts...)
- if err != nil {
- return err
- }
- return d.apply()
+ _, err := build(path, opts...)
+ return err
}
func Have(path string, opts ...opt.Option) resource.Resource {
@@ -196,10 +193,6 @@ func Have(path string, opts ...opt.Option) resource.Resource {
d.resource = resource.Register("Directory", d.path,
resource.ApplierFunc(func() error { return d.apply() }))
- if err := d.apply(); err != nil {
- log.Fatalf("failed to apply directory resource %s: %v", path, err)
- }
-
return d.resource
}