Skip to content

Commit 50cf8bd

Browse files
authored
Merge pull request #610 from bmjen/modules-3507
(MODULES-3507) Updates file_line path validation
2 parents 7053868 + 7b12504 commit 50cf8bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/puppet/type/file_line.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@
9393
newparam(:path) do
9494
desc 'The file Puppet will ensure contains the line specified by the line parameter.'
9595
validate do |value|
96-
unless (Puppet.features.posix? and value =~ /^\//) or (Puppet.features.microsoft_windows? and (value =~ /^.:\// or value =~ /^\/\/[^\/]+\/[^\/]+/))
97-
raise(Puppet::Error, "File paths must be fully qualified, not '#{value}'")
96+
unless Puppet::Util.absolute_path?(value)
97+
raise Puppet::Error, "File paths must be fully qualified, not '#{value}'"
9898
end
9999
end
100100
end

0 commit comments

Comments
 (0)