From 040cb7304af3fd25dd33a8d8961ca91ec81a11d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 23 Jan 2022 04:58:00 +0100 Subject: [PATCH] nix-shell: use clean rm, not any aliases/functions --- src/nix-build/nix-build.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index 471a03ac7..5cdf5c717 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -483,7 +483,7 @@ static void main_nix_build(int argc, char * * argv) lose the current $PATH directories. */ auto rcfile = (Path) tmpDir + "/rc"; std::string rc = fmt( - R"(_nix_shell_clean_tmpdir() { rm -rf %1%; }; )"s + + R"(_nix_shell_clean_tmpdir() { command rm -rf %1%; }; )"s + (keepTmp ? "trap _nix_shell_clean_tmpdir EXIT; " "exitHooks+=(_nix_shell_clean_tmpdir); "