ENV: use HOMEBREW_RUBY_PATH in compiler/SCM shims
Use the same interpreter for the shims that is also used to run the main Homebrew process (the one invoked via `brew`). The magic basically lies in executing `ruby` with the `-x` option (supported since at least 1.8) and in the following shebang line.
This commit is contained in:
parent
12a452557d
commit
49990ee93f
@ -1,6 +1,8 @@
|
||||
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0
|
||||
#!/bin/sh
|
||||
# Make sure this shim uses the same Ruby interpreter that is used by Homebrew.
|
||||
exec "$HOMEBREW_RUBY_PATH" -x "$0" "$@"
|
||||
#!/usr/bin/env ruby -W0
|
||||
|
||||
$:.unshift Dir["/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/lib/ruby/{1.8,2.0.0}"].first
|
||||
require "pathname"
|
||||
require "set"
|
||||
|
||||
|
||||
@ -1,4 +1,8 @@
|
||||
#!/usr/bin/ruby -W0
|
||||
#!/bin/sh
|
||||
# Make sure this shim uses the same Ruby interpreter that is used by Homebrew.
|
||||
exec "$HOMEBREW_RUBY_PATH" -x "$0" "$@"
|
||||
#!/usr/bin/env ruby -W0
|
||||
|
||||
# This script because we support $GIT, $HOMEBREW_SVN, etc. and Xcode-only
|
||||
# configurations. Order is careful to be what the user would want.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user