about summary refs log tree commit diff
path: root/perl
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-05-04T10·05+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-05-04T10·05+0200
commit4e17e7a4da4d82c3664b0b691c6a50debcb9e896 (patch)
tree3517befd4dd55314bd5b63aa97161583085764e2 /perl
parent33de2bc080dd08a6767440e61ceba6ce33234761 (diff)
Fix segfault in nix-copy-closure
Diffstat (limited to 'perl')
-rw-r--r--perl/lib/Nix/Store.xs3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl/lib/Nix/Store.xs b/perl/lib/Nix/Store.xs
index f0e990071e2e..ee60ce13011d 100644
--- a/perl/lib/Nix/Store.xs
+++ b/perl/lib/Nix/Store.xs
@@ -25,6 +25,7 @@ static ref<Store> store()
     static std::shared_ptr<Store> _store;
     if (!_store) {
         try {
+            logger = makeDefaultLogger();
             settings.processEnvironment();
             settings.loadConfFile();
             settings.update();
@@ -173,7 +174,7 @@ void exportPaths(int fd, ...)
     PPCODE:
         try {
             Paths paths;
-            for (int n = 2; n < items; ++n) paths.push_back(SvPV_nolen(ST(n)));
+            for (int n = 1; n < items; ++n) paths.push_back(SvPV_nolen(ST(n)));
             FdSink sink(fd);
             store()->exportPaths(paths, sink);
         } catch (Error & e) {