Skip to content

Commit 4146a0d

Browse files
committed
v4.3.1
===================================================================== - MacOS does some weird stuff with the homebrew prefix apparently
1 parent 8f3e862 commit 4146a0d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

zsh/lib/config.zsh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
[[ $__SCWRYPT -eq 1 ]] && return 0
22
#####################################################################
33

4-
SCWRYPTS_ROOT="$(cd -- ${0:a:h}; git rev-parse --show-toplevel 2>/dev/null)"
4+
# Apparently MacOS puts ALL of the homebrew stuff inside of a top level git repository
5+
# with bizarre git ignores; so:
6+
# - USE the git root if it's a manual install...
7+
# - UNLESS that git root is just the $(brew --prefix)
8+
SCWRYPTS_ROOT="$(cd -- ${0:a:h}; git rev-parse --show-toplevel 2>/dev/null | grep -v "^$(brew --prefix 2>/dev/null)$")"
59

610
[ $SCWRYPTS_ROOT ] && [ -d "$SCWRYPTS_ROOT" ] \
711
|| SCWRYPTS_ROOT="$(echo "${0:a:h}" | sed -n 's|\(share/scwrypts\).*$|\1|p')"

0 commit comments

Comments
 (0)