From f9efa18be146dc4372ac9c7a3a60ec1ad14cbd46 Mon Sep 17 00:00:00 2001 From: Martin Afanasjew Date: Sun, 10 Jan 2016 17:50:29 +0100 Subject: 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). --- Library/ENV/4.3/cc | 2 ++ Library/ENV/scm/git | 2 ++ 2 files changed, 4 insertions(+) (limited to 'Library') diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc index b48abde03..11d811508 100755 --- a/Library/ENV/4.3/cc +++ b/Library/ENV/4.3/cc @@ -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 diff --git a/Library/ENV/scm/git b/Library/ENV/scm/git index 57484a078..6124ffe5f 100755 --- a/Library/ENV/scm/git +++ b/Library/ENV/scm/git @@ -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 -- cgit v1.2.3