diff options
author | Peter Souter <p.souter@kainos.com> | 2014-12-18 23:08:13 +0000 |
---|---|---|
committer | Peter Souter <p.souter@kainos.com> | 2014-12-18 23:35:24 +0000 |
commit | b3d007f1daa9bd7c8c02f372494df3a6e6ff6acf (patch) | |
tree | f1924d2aa4d29121748ff2f898ea7f5c5ff76e18 | |
parent | cc8b147b5df539d1261508ed5c711a744d8584af (diff) | |
download | puppet-stdlib-b3d007f1daa9bd7c8c02f372494df3a6e6ff6acf.tar.gz puppet-stdlib-b3d007f1daa9bd7c8c02f372494df3a6e6ff6acf.tar.bz2 |
(MODULES-1582) Improve % detection
Avoids any validate commands that have %'s in them other than "... % ..."
-rw-r--r-- | lib/puppet/parser/functions/validate_cmd.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/parser/functions/validate_cmd.rb b/lib/puppet/parser/functions/validate_cmd.rb index 7290265..5df3c60 100644 --- a/lib/puppet/parser/functions/validate_cmd.rb +++ b/lib/puppet/parser/functions/validate_cmd.rb @@ -39,7 +39,7 @@ module Puppet::Parser::Functions tmpfile.write(content) tmpfile.close - if checkscript.include?('%') + if checkscript =~ /\s%(\s|$)/ check_with_correct_location = checkscript.gsub(/%/,tmpfile.path) else check_with_correct_location = "#{checkscript} #{tmpfile.path}" |