diff --git a/pkgs/build-support/dotnet/build-dotnet-module/default.nix b/pkgs/build-support/dotnet/build-dotnet-module/default.nix index 5a465b48c1d7..5e8d76defe76 100644 --- a/pkgs/build-support/dotnet/build-dotnet-module/default.nix +++ b/pkgs/build-support/dotnet/build-dotnet-module/default.nix @@ -204,7 +204,9 @@ stdenvNoCC.mkDerivation (args // { fi # Since mktemp is used this will be empty if the script didnt succesfully complete - ! test -s "$depsFile" && rm -rf "$depsFile" + if ! test -s "$depsFile"; then + rm -rf "$depsFile" + fi } trap exitTrap EXIT INT TERM