diff options
| author | Martin Afanasjew | 2016-06-13 02:51:50 +0200 |
|---|---|---|
| committer | Martin Afanasjew | 2016-06-19 22:12:34 +0200 |
| commit | a8165b6dbd9837c0ba3c8a0fa368e80aaf5a5dd9 (patch) | |
| tree | bc525b00daa79031fef6a83016e2bd41f50ba1e2 | |
| parent | 96cbce015e0b327bd7d30fc101cbd25452cd2fd8 (diff) | |
| download | brew-a8165b6dbd9837c0ba3c8a0fa368e80aaf5a5dd9.tar.bz2 | |
scm/git: allow introspecting path lookup
Print path of first detected Git instead of executing it. This is hidden
behind a `--homebrew=print-path` argument that is unlikely to conflict
with any existing or future Git flags.
| -rwxr-xr-x | Library/ENV/scm/git | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/ENV/scm/git b/Library/ENV/scm/git index 1e74a175d..091b1713d 100755 --- a/Library/ENV/scm/git +++ b/Library/ENV/scm/git @@ -23,6 +23,10 @@ def exec(*args) # prevent fork-bombs arg0 = args.first return if arg0 =~ /^#{F}/i || Pathname.new(arg0).realpath == SELF_REAL + if ARGV == %w[--homebrew=print-path] + puts arg0 + exit + end super end |
