Skip to content
Browse files

bugfix: was losing parameters in @command; now preserved properly

  • Loading branch information...
1 parent 6d42f54 commit 0808b68bc2f4dc62dfc0afb3773657f7d4662554 @swaits committed May 4, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/execjs/external_runtime.rb
View
4 lib/execjs/external_runtime.rb
@@ -113,15 +113,15 @@ def locate_binary
def which(command)
Array(command).each do |name|
- name = name.split(/\s+/).first
+ name, *params = name.split(/\s+/)
result = if ExecJS.windows?
`#{ExecJS.root}/support/which.bat #{name}`
else
`which #{name} 2>/dev/null`
end
if path = result.strip.split("\n").first
- return path
+ return path + ( params.empty? ? '' : ' ' + params.join(' ') )
end
end
nil

0 comments on commit 0808b68

Please sign in to comment.
Something went wrong with that request. Please try again.