Permalink
Browse files

Merge pull request #223 from a3no/mybranch2

Change regular expression for adding env-PATH with exclamation.
  • Loading branch information...
mizzy committed Aug 5, 2013
2 parents 2d3053b + b8bd6dd commit f22c338629535e7067ade9ba638fb72cd61cd63d
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/serverspec/backend/exec.rb
@@ -37,8 +37,8 @@ def build_command(cmd)
path = Serverspec.configuration.path || RSpec.configuration.path
if path
cmd = "env PATH=#{path}:$PATH #{cmd}"
cmd.gsub!(/(\&\&\s*\(?)/, "\\1env PATH=#{path}:$PATH ")
cmd.gsub!(/(\|\|\s*\(?)/, "\\1env PATH=#{path}:$PATH ")
cmd.gsub!(/(\&\&\s*!?\(?\s*)/, "\\1env PATH=#{path}:$PATH ")
cmd.gsub!(/(\|\|\s*!?\(?\s*)/, "\\1env PATH=#{path}:$PATH ")
end
cmd
end

0 comments on commit f22c338

Please sign in to comment.