mirror of
https://github.com/NixOS/nix.git
synced 2024-10-30 22:00:57 +00:00
dropEmptyInitThenConcatStringsSep -> concatStringSep: store paths are not empty
This commit is contained in:
parent
49d100ba8b
commit
f1966e22d9
@ -32,6 +32,8 @@
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include "strings.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
DerivationGoal::DerivationGoal(const StorePath & drvPath,
|
||||
@ -895,7 +897,7 @@ void runPostBuildHook(
|
||||
std::map<std::string, std::string> hookEnvironment = getEnv();
|
||||
|
||||
hookEnvironment.emplace("DRV_PATH", store.printStorePath(drvPath));
|
||||
hookEnvironment.emplace("OUT_PATHS", chomp(dropEmptyInitThenConcatStringsSep(" ", store.printStorePathSet(outputPaths))));
|
||||
hookEnvironment.emplace("OUT_PATHS", chomp(concatStringsSep(" ", store.printStorePathSet(outputPaths))));
|
||||
hookEnvironment.emplace("NIX_CONFIG", globalConfig.toKeyValue());
|
||||
|
||||
struct LogSink : Sink {
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "store-api.hh"
|
||||
#include "json-utils.hh"
|
||||
#include "comparator.hh"
|
||||
#include "strings.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
@ -30,7 +31,7 @@ std::string ValidPathInfo::fingerprint(const Store & store) const
|
||||
"1;" + store.printStorePath(path) + ";"
|
||||
+ narHash.to_string(HashFormat::Nix32, true) + ";"
|
||||
+ std::to_string(narSize) + ";"
|
||||
+ dropEmptyInitThenConcatStringsSep(",", store.printStorePathSet(references));
|
||||
+ concatStringsSep(",", store.printStorePathSet(references));
|
||||
}
|
||||
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include <filesystem>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include "strings.hh"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace nix {
|
||||
@ -1208,7 +1210,7 @@ std::string StoreDirConfig::showPaths(const StorePathSet & paths)
|
||||
|
||||
std::string showPaths(const PathSet & paths)
|
||||
{
|
||||
return dropEmptyInitThenConcatStringsSep(", ", quoteStrings(paths));
|
||||
return concatStringsSep(", ", quoteStrings(paths));
|
||||
}
|
||||
|
||||
|
||||
|
@ -815,7 +815,7 @@ struct CmdProfileList : virtual EvalCommand, virtual StoreCommand, MixDefaultPro
|
||||
logger->cout("Original flake URL: %s", element.source->originalRef.to_string());
|
||||
logger->cout("Locked flake URL: %s", element.source->lockedRef.to_string());
|
||||
}
|
||||
logger->cout("Store paths: %s", dropEmptyInitThenConcatStringsSep(" ", store->printStorePathSet(element.storePaths)));
|
||||
logger->cout("Store paths: %s", concatStringsSep(" ", store->printStorePathSet(element.storePaths)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user