ENV: protect against RUBYLIB/RUBYOPT

Some things can break in hard to debug ways if users or build scripts
set these variables, causing our otherwise quite robust Ruby wrappers
to fail. In theory, we could also use `--disable-rubyopt`, but this is
not supported in Ruby 1.8 (and we still care about it).
This commit is contained in:
Martin Afanasjew 2016-01-10 17:50:29 +01:00
parent 49990ee93f
commit f9efa18be1
2 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,7 @@
#!/bin/sh
# Make sure this shim uses the same Ruby interpreter that is used by Homebrew.
unset RUBYLIB
unset RUBYOPT
exec "$HOMEBREW_RUBY_PATH" -x "$0" "$@"
#!/usr/bin/env ruby -W0

View File

@ -1,5 +1,7 @@
#!/bin/sh
# Make sure this shim uses the same Ruby interpreter that is used by Homebrew.
unset RUBYLIB
unset RUBYOPT
exec "$HOMEBREW_RUBY_PATH" -x "$0" "$@"
#!/usr/bin/env ruby -W0