fix(OSX): Remove running shell check on OSX

The running shell check in it's current state is non-portable. As such
if the current system is Darwin the check is removed
This commit is contained in:
Robert Morrison 2024-02-19 17:59:18 +00:00
parent a60119faff
commit 592295a85a
Signed by: robert
GPG Key ID: 73E012EB3F4EC696

View File

@ -35,15 +35,18 @@ if [[ "$SHELL" != "/bin/zsh" ]]; then
printf "and let me know what Distro you're using and the path to zsh\n" >&2 printf "and let me know what Distro you're using and the path to zsh\n" >&2
exit 1 exit 1
fi fi
## Confirm running shell is actually zsh ## Confirm running shell is actually zsh
runningShell="$(ps -p $$ c -o cmd | tail -n1)" if [[ "$(uname)" != "Darwin" ]]; then
if [[ "$runningShell" != "zsh" ]]; then runningShell="$(ps -p $$ c -o cmd | tail -n1)"
printf "Your $SHELL variable is set to %s\n" $SHELL >&2 if [[ "$runningShell" != "zsh" ]]; then
printf "This is correct However your running shell is %s\n" $runningShell >&2 printf "Your $SHELL variable is set to %s\n" $SHELL >&2
printf "This is unexpected (Expected values "zsh")\n" >&2 printf "This is correct However your running shell is %s\n" $runningShell >&2
printf "If zsh is named something different on your system open a GitHub issue\n" >&2 printf "This is unexpected (Expected values "zsh")\n" >&2
printf "and let me know what Distro you are using and the name that zsh has\n" printf "If zsh is named something different on your system open a GitHub issue\n" >&2
exit 1 printf "and let me know what Distro you are using and the name that zsh has\n"
exit 1
fi
fi fi
@ -172,36 +175,3 @@ unset -f ZSH_PLUG_pluginInstall
unset -f ZSH_PLUG_pluginTest unset -f ZSH_PLUG_pluginTest
unset -f ZSH_PLUG_pluginLoad unset -f ZSH_PLUG_pluginLoad
unset githubPrefix unset githubPrefix