Skip to content

Commit 6babd68

Browse files
committed
Work around sloppy /etc/zshenv in Lion.
Make sure to preserve the PATH from the launching shell. Lion would otherwise reset it to a default value.
1 parent 8695898 commit 6babd68

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: Linux/install

+9
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ if test -z "$ZSH_VERSION"; then
3939
echo
4040
exit 2
4141
fi
42+
# Mac OS X 10.7 (Lion) is misconfigured to reset PATH for "zsh -f"
43+
# Save the original value so it can be restored in zsh.
44+
export PATH_NwldpJ="$PATH"
4245
exec $ZSH -f "$0" "$@"
4346
fi
4447

@@ -48,6 +51,12 @@ emulate zsh
4851
umask 022
4952
setopt extendedglob
5053

54+
# restore the saved PATH and remove any duplicate entries.
55+
PATH="${PATH_NwldpJ}:${PATH}"
56+
# remove blank and duplicate entries from the PATH
57+
typeset -U path
58+
path=( $path )
59+
5160
# Constants ------------------------------------------------------------------
5261

5362
DOC=${${DOC##[[:space:]]##}%%[[:space:]]##}

0 commit comments

Comments
 (0)