1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 04:21:16 +02:00

Add function for quoting strings

(cherry picked from commit 7dcf5b011a)
This commit is contained in:
Eelco Dolstra 2019-05-02 21:09:52 +02:00
parent 5a7e7fc35f
commit edc34cc1a2
4 changed files with 22 additions and 31 deletions

View file

@ -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));
}