nix-shell: use clean rm, not any aliases/functions

This commit is contained in:
Sandro Jäckel 2022-01-23 04:58:00 +01:00
parent c9a4ddb9c0
commit 040cb7304a
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

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