Merge pull request #164633 from IvarWithoutBones/fix/dotnet-home

dotnet: don't set $HOME if its already writable
This commit is contained in:
Pavol Rusnak 2022-03-17 21:43:44 +01:00 committed by GitHub
commit 9f60e300d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,7 +90,10 @@ in stdenv.mkDerivation rec {
'';
setupHook = writeText "dotnet-setup-hook" ''
export HOME=$(mktemp -d) # Dotnet expects a writable home directory for its configuration files
if [ ! -w "$HOME" ]; then
export HOME=$(mktemp -d) # Dotnet expects a writable home directory for its configuration files
fi
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 # Dont try to expand NuGetFallbackFolder to disk
export DOTNET_NOLOGO=1 # Disables the welcome message
export DOTNET_CLI_TELEMETRY_OPTOUT=1