From d16a5f2ab29d57fb9aaeaa0066a1d16bc5f2507d Mon Sep 17 00:00:00 2001 From: "Deavon M. McCaffery" Date: Tue, 25 Jun 2019 17:03:58 -0700 Subject: [PATCH] fix(dotnet): set paths for global tools (#19) --- src/scripts/eval/set-dotnet-path | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/scripts/eval/set-dotnet-path b/src/scripts/eval/set-dotnet-path index dc256ed..8eed14f 100755 --- a/src/scripts/eval/set-dotnet-path +++ b/src/scripts/eval/set-dotnet-path @@ -1,9 +1,19 @@ #!/usr/bin/env bash -if [ -e "/usr/local/share/dotnet" ]; then - export PATH="/usr/local/share/dotnet:$PATH" +if [ -d "/usr/local/share/dotnet" ]; then + export DOTNET_ROOT="/usr/local/share/dotnet" + export PATH="$DOTNET_ROOT:$PATH" fi -if [ -e "$HOME/.dotnet/dotnet" ]; then - export PATH="$HOME/.dotnet:$PATH" +if [ -d "/usr/local/share/dotnet/tools" ]; then + export PATH="/usr/local/share/dotnet/tools:$PATH" +fi + +if [ -d "$HOME/.dotnet" ]; then + export DOTNET_ROOT="$HOME/.dotnet" + export PATH="$DOTNET_ROOT:$PATH" +fi + +if [ -d "$HOME/.dotnet/tools" ]; then + export PATH="$HOME/.dotnet/tools:$PATH" fi