Open JayBazuzi opened 3 months ago
I can repro using zsh 5.8 (x86_64-ubuntu-linux-gnu)
I think I know the reason. The script instructs shell to exit if an unset variable is encountered (via set -u
). The FUNCNAME[0]
located here:
https://github.com/dotnet/install-scripts/blob/033622cafb10f813db17a4ed511f2bbade9a77ee/src/dotnet-install.sh#L15
is a Bash specific thing. ZSH uses funcstack
, but I'm not sure why it fails only when dot-sourced.
On a Mac running ZSH:
and then my shell closes, ouch!