about summary refs log tree commit diff
path: root/third_party/nix/src/tests/store-util.hh
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/tests/store-util.hh')
-rw-r--r--third_party/nix/src/tests/store-util.hh7
1 files changed, 5 insertions, 2 deletions
diff --git a/third_party/nix/src/tests/store-util.hh b/third_party/nix/src/tests/store-util.hh
index 170794616b..b31bb0edcb 100644
--- a/third_party/nix/src/tests/store-util.hh
+++ b/third_party/nix/src/tests/store-util.hh
@@ -58,10 +58,13 @@ class StoreTest : public ::testing::Test {
   }
 
   absl::StatusOr<std::unique_ptr<nix::LocalStore>> OpenTemporaryStore() {
-    ASSIGN_OR_RETURN(std::filesystem::path storePath, OpenTempDir());
+    absl::StatusOr<std::filesystem::path> storePath = OpenTempDir();
+    if (!storePath.ok()) {
+      return storePath.status();
+    }
 
     nix::Store::Params params;
-    params["root"] = storePath;
+    params["root"] = *storePath;
 
     return std::make_unique<nix::LocalStore>(params);
   }