Skip to content

Commit 724dcaa

Browse files
committed
Merge pull request #330 from duritong/fix_autorequire
(MODULES-2023) - autorequire the file we are generating
2 parents 8d7d427 + 09a380c commit 724dcaa

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

lib/puppet/type/concat_file.rb

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -89,20 +89,9 @@ def exists?
8989
end.compact
9090
end
9191

92-
# Copied from puppet's file type
93-
# Autorequire the nearest ancestor directory found in the catalog.
92+
# Autorequire the file we are generating below
9493
autorequire(:file) do
95-
req = []
96-
path = Pathname.new(self[:path])
97-
if !path.root?
98-
# Start at our parent, to avoid autorequiring ourself
99-
parents = path.parent.enum_for(:ascend)
100-
if found = parents.find { |p| catalog.resource(:file, p.to_s) }
101-
req << found.to_s
102-
end
103-
end
104-
105-
req
94+
[self[:path]]
10695
end
10796

10897
def should_content

0 commit comments

Comments
 (0)