about summary refs log tree commit diff
path: root/scripts/nix-build.in
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-19T14·01+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-19T14·01+0100
commit73f74ebba09f8bceed46a11f7348b4c398bde6f3 (patch)
tree7c4f1b05bc3a03737a7321fee9daeec069b414c7 /scripts/nix-build.in
parenta7e70518b8d0cb9a72cb3733b563b49caf922966 (diff)
nix-shell: Don't leave a temporary directory in /tmp behind
Diffstat (limited to 'scripts/nix-build.in')
-rwxr-xr-xscripts/nix-build.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/nix-build.in b/scripts/nix-build.in
index 828eb1c3967c..4f59118f8b79 100755
--- a/scripts/nix-build.in
+++ b/scripts/nix-build.in
@@ -206,6 +206,7 @@ foreach my $expr (@exprs) {
         my $rcfile = "$tmpDir/rc";
         writeFile(
             $rcfile,
+            "rm -rf '$tmpDir'; " .
             'unset BASH_ENV; ' .
             '[ -n "$PS1" ] && [ -e ~/.bashrc ] && source ~/.bashrc; ' .
             ($pure ? '' : 'p=$PATH; ' ) .