diff options
author | Hunter Haugen <hunter@puppet.com> | 2016-06-29 07:15:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-29 07:15:39 -0700 |
commit | 50cf8bd5b77ba6353ab6477c4c76f437b834b6b0 (patch) | |
tree | 3f6e4a34b8a641d9bde5445e04b62c0aa7b74f35 /lib | |
parent | 7053868eaf59b1318d68e3abea58b1fccb2b8a3d (diff) | |
parent | 7b1250478c513a3c02c463ec7cdd62d427957400 (diff) |
Merge pull request #610 from bmjen/modules-3507
(MODULES-3507) Updates file_line path validation
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/type/file_line.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/type/file_line.rb b/lib/puppet/type/file_line.rb index f2c6937..a02b514 100644 --- a/lib/puppet/type/file_line.rb +++ b/lib/puppet/type/file_line.rb @@ -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 |