Permalink
Browse files

Fix `cmd` typo

  • Loading branch information...
1 parent 0458862 commit 9329d2b92ee6ef5a788c0e712d73441f24716503 @josh josh committed Dec 5, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/execjs/external_runtime.rb
@@ -126,12 +126,12 @@ def which_windows(name)
result.strip.split("\n").first
end
- def which_unix(name)
+ def which_unix(cmd)
if File.executable? cmd
cmd
else
- path = ENV['PATH'].split(File::PATH_SEPARATOR).find { |path|
- File.executable? File.join(path, cmd)
+ path = ENV['PATH'].split(File::PATH_SEPARATOR).find { |p|
+ File.executable? File.join(p, cmd)
}
path && File.expand_path(cmd, path)
end

0 comments on commit 9329d2b

Please sign in to comment.