mirror of
https://github.com/NixOS/nix.git
synced 2025-11-11 04:56:01 +01:00
Fix evalState::rootFS paths' to_string()
This showPath is getting a little too ad hoc, but it works for now.
This commit is contained in:
parent
5def18e53b
commit
f3d2a16eff
2 changed files with 4 additions and 1 deletions
|
|
@ -315,6 +315,7 @@ EvalState::EvalState(
|
|||
{
|
||||
corepkgsFS->setPathDisplay("<nix", ">");
|
||||
internalFS->setPathDisplay("«nix-internal»", "");
|
||||
rootFS->setPathDisplay("/", "");
|
||||
|
||||
countCalls = getEnv("NIX_COUNT_CALLS").value_or("0") != "0";
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,9 @@ void SourceAccessor::setPathDisplay(std::string displayPrefix, std::string displ
|
|||
|
||||
std::string SourceAccessor::showPath(const CanonPath & path)
|
||||
{
|
||||
return displayPrefix + (displayPrefix.empty() ? "" : ":") + path.rel() + displaySuffix;
|
||||
return displayPrefix
|
||||
+ ((displayPrefix.empty() || displayPrefix.ends_with("/")) ? "" : ":") + path.rel()
|
||||
+ displaySuffix;
|
||||
}
|
||||
|
||||
CanonPath SourceAccessor::resolveSymlinks(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue