Skip to content

dotnet-install.sh gives wrong path when using "source" on macOS 10.13 #20

@jon-is-me

Description

@jon-is-me

Steps to reproduce

echo $PATH # results in: "/my/original/path:/other/original/path"
curl -s https://dot.net/v1/dotnet-install.sh
source ./dotnet-install.sh
echo $PATH # results in: "Saving session.../.dotnet:/my/original/path:/other/original/path"

Expected behavior

echo $PATH should result in "/Users/jonathann92/.dotnet/:/my/original/path:/other/original/path"

Actual behavior

echo $PATH results in: "Saving session.../.dotnet:/my/original/path:/other/original/path"

Environment data

dotnet --info output: Not relevant because im installing dotnet.

Output for running bash ./dotnet-install.sh

% bash ./dotnet-install.sh 
dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.403/dotnet-sdk-2.1.403-osx-x64.tar.gz
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.403/dotnet-sdk-2.1.403-osx-x64.tar.gz
dotnet-install: Adding to current process PATH: `/Users/jnguyen/.dotnet`. Note: This change will be visible only when sourcing script.
dotnet-install: Installation finished successfully.

Output for running source ./dotnet-install.sh

% source ./dotnet-install.sh 
dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.403/dotnet-sdk-2.1.403-osx-x64.tar.gz
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.403/dotnet-sdk-2.1.403-osx-x64.tar.gz
-bash: rvm_bash_nounset: unbound variable
-bash: HISTTIMEFORMAT: unbound variable
dotnet-install: Adding to current process PATH: `Saving session.../.dotnet`. Note: This change will be visible only when sourcing script.
dotnet-install: Installation finished successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions