about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/local-store.hh
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libstore/local-store.hh')
-rw-r--r--third_party/nix/src/libstore/local-store.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/third_party/nix/src/libstore/local-store.hh b/third_party/nix/src/libstore/local-store.hh
index 193050e538b2..cfcfb35cc3cc 100644
--- a/third_party/nix/src/libstore/local-store.hh
+++ b/third_party/nix/src/libstore/local-store.hh
@@ -98,8 +98,9 @@ class LocalStore : public LocalFSStore {
  public:
   // Hack for build-remote.cc.
   // TODO(tazjin): remove this when we've got gRPC
-  PathSet locksHeld = absl::StrSplit(
-      getEnv("NIX_HELD_LOCKS"), absl::ByAnyChar(" \t\n\r"), absl::SkipEmpty());
+  PathSet locksHeld =
+      absl::StrSplit(getEnv("NIX_HELD_LOCKS").value_or(""),
+                     absl::ByAnyChar(" \t\n\r"), absl::SkipEmpty());
 
   /* Initialise the local store, upgrading the schema if
      necessary. */