summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-19 15:01:04 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-19 15:01:04 +0100
commit73f74ebba09f8bceed46a11f7348b4c398bde6f3 (patch)
tree7c4f1b05bc3a03737a7321fee9daeec069b414c7
parenta7e70518b8d0cb9a72cb3733b563b49caf922966 (diff)
downloadguix-73f74ebba09f8bceed46a11f7348b4c398bde6f3.tar.gz
nix-shell: Don't leave a temporary directory in /tmp behind
-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 828eb1c396..4f59118f8b 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; ' ) .