Merge pull request #610 from bmjen/modules-3507
(MODULES-3507) Updates file_line path validation
This commit is contained in:
commit
50cf8bd5b7
1 changed files with 2 additions and 2 deletions
|
@ -93,8 +93,8 @@ Puppet::Type.newtype(:file_line) do
|
|||
newparam(:path) do
|
||||
desc 'The file Puppet will ensure contains the line specified by the line parameter.'
|
||||
validate do |value|
|
||||
unless (Puppet.features.posix? and value =~ /^\//) or (Puppet.features.microsoft_windows? and (value =~ /^.:\// or value =~ /^\/\/[^\/]+\/[^\/]+/))
|
||||
raise(Puppet::Error, "File paths must be fully qualified, not '#{value}'")
|
||||
unless Puppet::Util.absolute_path?(value)
|
||||
raise Puppet::Error, "File paths must be fully qualified, not '#{value}'"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue