about summary refs log tree commit diff
path: root/scripts/download-using-manifests.pl.in
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-07-18T15·34+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-07-18T15·34+0000
commit989176c56e1996a7df87bb501ad09aed1f3b395d (patch)
tree998fc55a3e5a918840a835a17e690ea601276f6b /scripts/download-using-manifests.pl.in
parent8bc591a6f07ee577b5aa594dfa705f3ddabd269d (diff)
* Allow read-only access to the store (e.g., non-root users on NixOS
  can do operations like "nix-store -qR <path>" even without the Nix
  daemon).

Diffstat (limited to 'scripts/download-using-manifests.pl.in')
-rw-r--r--scripts/download-using-manifests.pl.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/download-using-manifests.pl.in b/scripts/download-using-manifests.pl.in
index 8207aaaa4ec2..c0b822b912e4 100644
--- a/scripts/download-using-manifests.pl.in
+++ b/scripts/download-using-manifests.pl.in
@@ -8,7 +8,6 @@ use File::Temp qw(tempdir);
 my $manifestDir = "@localstatedir@/nix/manifests";
 my $logFile = "@localstatedir@/log/nix/downloads";
 
-open LOGFILE, ">>$logFile" or die "cannot open log file $logFile";
 
 # Create a temporary directory.
 my $tmpDir = tempdir("nix-download.XXXXXX", CLEANUP => 1, TMPDIR => 1)
@@ -76,6 +75,8 @@ die unless scalar @ARGV == 2;
 my $targetPath = $ARGV[1];
 
 
+open LOGFILE, ">>$logFile" or die "cannot open log file $logFile";
+
 my $date = strftime ("%F %H:%M:%S UTC", gmtime (time));
 print LOGFILE "$$ get $targetPath $date\n";