Merge pull request #5965 from SuperSandro2000/nix-shell-rm

nix-shell: use clean rm, not any aliases/functions
This commit is contained in:
Eelco Dolstra 2022-01-24 12:40:53 +01:00 committed by GitHub
commit 1e2bfd3da5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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); "