forked from mirrors/nixpkgs
dotnet: don't set $HOME if its already writable
This fixes an issue where the setup hook would overwrite $HOME in a nix-shell. Fixes #164450, #164295
This commit is contained in:
parent
5358c90ac1
commit
e99ee4624a
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue