diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index 0c476c25b1..49692aa7e4 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -81,6 +81,7 @@ case "$*" in ;; shellenv) source "${HOMEBREW_LIBRARY}/Homebrew/cmd/shellenv.sh" + shift homebrew-shellenv "$1" exit 0 ;; diff --git a/Library/Homebrew/cmd/shellenv.sh b/Library/Homebrew/cmd/shellenv.sh index 2f2af3ff1f..d8c769a9ac 100644 --- a/Library/Homebrew/cmd/shellenv.sh +++ b/Library/Homebrew/cmd/shellenv.sh @@ -24,7 +24,7 @@ homebrew-shellenv() { then HOMEBREW_SHELL_NAME="$1" else - HOMEBREW_SHELL_NAME="$(/bin/ps -p "${PPID}" -c -o comm=)}" + HOMEBREW_SHELL_NAME="$(/bin/ps -p "${PPID}" -c -o comm=)" fi case "${HOMEBREW_SHELL_NAME}" in