From: Wonyoung Choi Date: Thu, 21 Apr 2022 04:28:57 +0000 (+0900) Subject: Ensure that the nuget config file is created. X-Git-Tag: submit/tizen/20220608.091735~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F67%2F274167%2F1;p=platform%2Fcore%2Fdotnet%2Fbuild-tools.git Ensure that the nuget config file is created. Change-Id: Ibc22df54604117f1d95e9ec3f9d0d868a195ab63 --- diff --git a/tools/dotnet-wrapper.sh b/tools/dotnet-wrapper.sh index 1babad0..1e19ec0 100755 --- a/tools/dotnet-wrapper.sh +++ b/tools/dotnet-wrapper.sh @@ -11,9 +11,13 @@ export MSBUILDDISABLENODEREUSE=true # The public NuGet repository can not be used in GBS builds because of the network access. NUGET_CONFIG_FILE=$HOME/.nuget/NuGet/NuGet.Config if [ ! -f "$HOME/.nuget_config_fixed" ]; then - $DOTNET_CLI_PATH nuget disable source nuget.org --configfile $NUGET_CONFIG_FILE - $DOTNET_CLI_PATH nuget add source -n local /nuget --configfile $NUGET_CONFIG_FILE - touch $HOME/.nuget_config_fixed 2>/dev/null || true + # Ensure that the nuget config file is created. + $DOTNET_CLI_PATH nuget locals -l all + if [ -f $NUGET_CONFIG_FILE ]; then + $DOTNET_CLI_PATH nuget disable source nuget.org --configfile $NUGET_CONFIG_FILE + $DOTNET_CLI_PATH nuget add source -n local /nuget --configfile $NUGET_CONFIG_FILE + touch $HOME/.nuget_config_fixed 2>/dev/null || true + fi fi # This is a workaround for the relative path issue in dotnet-cli.