From edc34cc1a2865777cee6b325f705fb218955b593 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 2 May 2019 21:09:52 +0200 Subject: Add function for quoting strings (cherry picked from commit 7dcf5b011a0942ecf953f2b607c4c8d0e9e652c7) --- src/libstore/build.cc | 2 +- src/libstore/store-api.cc | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'src/libstore') diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 9c6aedfa5..7efa81a62 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -1904,7 +1904,7 @@ void DerivationGoal::startBuilder() concatStringsSep(", ", parsedDrv->getRequiredSystemFeatures()), worker.store.printStorePath(drvPath), settings.thisSystem, - concatStringsSep(", ", settings.systemFeatures)); + concatStringsSep(", ", settings.systemFeatures)); if (drv->isBuiltin()) preloadNSS(); diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index b043feb0a..aacbe5e0b 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -741,12 +741,7 @@ std::string Store::showPaths(const StorePathSet & paths) string showPaths(const PathSet & paths) { - string s; - for (auto & i : paths) { - if (s.size() != 0) s += ", "; - s += "'" + i + "'"; - } - return s; + return concatStringsSep(", ", quoteStrings(paths)); } -- cgit v1.2.3