Merge pull request #15383 from halostatue/fix-shellenv-parameterless

Fix small errors in `brew shellenv`
This commit is contained in:
Bo Anderson 2023-05-08 16:23:10 +01:00 committed by GitHub
commit 8bfd5d738c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -81,6 +81,7 @@ case "$*" in
;;
shellenv)
source "${HOMEBREW_LIBRARY}/Homebrew/cmd/shellenv.sh"
shift
homebrew-shellenv "$1"
exit 0
;;

View File

@ -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