about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/binary-cache-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libstore/binary-cache-store.cc')
-rw-r--r--third_party/nix/src/libstore/binary-cache-store.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/third_party/nix/src/libstore/binary-cache-store.cc b/third_party/nix/src/libstore/binary-cache-store.cc
index b862ea005870..fce4dc0e112c 100644
--- a/third_party/nix/src/libstore/binary-cache-store.cc
+++ b/third_party/nix/src/libstore/binary-cache-store.cc
@@ -42,7 +42,8 @@ void BinaryCacheStore::init() {
     upsertFile(cacheInfoFile, "StoreDir: " + storeDir + "\n",
                "text/x-nix-cache-info");
   } else {
-    for (auto& line : absl::StrSplit(*cacheInfo, absl::ByChar('\n'))) {
+    for (auto& line :
+         absl::StrSplit(*cacheInfo, absl::ByChar('\n'), absl::SkipEmpty())) {
       size_t colon = line.find(':');
       if (colon == std::string::npos) {
         continue;