summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/parser/functions/validate_cmd.rb2
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}"