summaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-11-02 21:38:23 +0100
committerLudovic Courtès <ludo@gnu.org>2014-11-02 21:38:23 +0100
commit47e643db107d4c4569fe2195c5369d748169ae47 (patch)
tree25ef16329073fb0641c1f18b566e534ebdc5b7e4 /nix
parent05962f2958eb98bad384702455236ff9d2acfb39 (diff)
downloadpatches-47e643db107d4c4569fe2195c5369d748169ae47.tar
patches-47e643db107d4c4569fe2195c5369d748169ae47.tar.gz
guix-register: Do not attempt to create NIX_STORE_DIR.
Fixes <http://bugs.gnu.org/18689>. Reported by Philip Woods <elzairthesorcerer@gmail.com>. * nix/guix-register/guix-register.cc (main): Move 'store' instantiation above 'settings.nixStore' assignment.
Diffstat (limited to 'nix')
-rw-r--r--nix/guix-register/guix-register.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/nix/guix-register/guix-register.cc b/nix/guix-register/guix-register.cc
index 92eedab9f5..f5c610fde0 100644
--- a/nix/guix-register/guix-register.cc
+++ b/nix/guix-register/guix-register.cc
@@ -224,16 +224,16 @@ main (int argc, char *argv[])
{
argp_parse (&argp, argc, argv, 0, 0, 0);
+ /* Instantiate the store. This creates any missing directories among
+ 'settings.nixStore', 'settings.nixDBPath', etc. */
+ LocalStore store;
+
if (!prefix.empty ())
/* Under the --prefix tree, the final name of the store will be
NIX_STORE_DIR. Set it here so that the database uses file names
prefixed by NIX_STORE_DIR and not PREFIX + NIX_STORE_DIR. */
settings.nixStore = NIX_STORE_DIR;
- /* Instantiate the store. This creates any missing directories among
- 'settings.nixStore', 'settings.nixDBPath', etc. */
- LocalStore store;
-
register_validity (&store, *input, deduplication);
}
catch (std::exception &e)