mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-27 08:16:14 +02:00
Rename logging->stdout to logging->stdout_
musl doesn't like this identifier
This commit is contained in:
parent
58bc3b6578
commit
88cf6ffce3
7 changed files with 9 additions and 9 deletions
|
@ -87,7 +87,7 @@ public:
|
||||||
virtual void writeToStdout(std::string_view s);
|
virtual void writeToStdout(std::string_view s);
|
||||||
|
|
||||||
template<typename... Args>
|
template<typename... Args>
|
||||||
inline void stdout(const std::string & fs, const Args & ... args)
|
inline void stdout_(const std::string & fs, const Args & ... args)
|
||||||
{
|
{
|
||||||
boost::format f(fs);
|
boost::format f(fs);
|
||||||
formatHelper(f, args...);
|
formatHelper(f, args...);
|
||||||
|
|
|
@ -58,7 +58,7 @@ struct CmdAddToStore : MixDryRun, StoreCommand
|
||||||
store->addToStore(info, source);
|
store->addToStore(info, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
logger->stdout("%s", store->printStorePath(info.path));
|
logger->stdout_("%s", store->printStorePath(info.path));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ struct CmdEval : MixJSON, InstallableCommand
|
||||||
printValueAsJSON(*state, true, *v, jsonOut, context);
|
printValueAsJSON(*state, true, *v, jsonOut, context);
|
||||||
} else {
|
} else {
|
||||||
state->forceValueDeep(*v);
|
state->forceValueDeep(*v);
|
||||||
logger->stdout("%s", *v);
|
logger->stdout_("%s", *v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -69,7 +69,7 @@ struct CmdHash : Command
|
||||||
|
|
||||||
Hash h = hashSink->finish().first;
|
Hash h = hashSink->finish().first;
|
||||||
if (truncate && h.hashSize > 20) h = compressHash(h, 20);
|
if (truncate && h.hashSize > 20) h = compressHash(h, 20);
|
||||||
logger->stdout(h.to_string(base, base == SRI));
|
logger->stdout_(h.to_string(base, base == SRI));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -103,7 +103,7 @@ struct CmdToBase : Command
|
||||||
void run() override
|
void run() override
|
||||||
{
|
{
|
||||||
for (auto s : args)
|
for (auto s : args)
|
||||||
logger->stdout(Hash(s, ht).to_string(base, base == SRI));
|
logger->stdout_(Hash(s, ht).to_string(base, base == SRI));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -37,11 +37,11 @@ struct MixLs : virtual Args, MixJSON
|
||||||
auto line = fmt("%s %20d %s", tp, st.fileSize, relPath);
|
auto line = fmt("%s %20d %s", tp, st.fileSize, relPath);
|
||||||
if (st.type == FSAccessor::Type::tSymlink)
|
if (st.type == FSAccessor::Type::tSymlink)
|
||||||
line += " -> " + accessor->readLink(curPath);
|
line += " -> " + accessor->readLink(curPath);
|
||||||
logger->stdout(line);
|
logger->stdout_(line);
|
||||||
if (recursive && st.type == FSAccessor::Type::tDirectory)
|
if (recursive && st.type == FSAccessor::Type::tDirectory)
|
||||||
doPath(st, curPath, relPath, false);
|
doPath(st, curPath, relPath, false);
|
||||||
} else {
|
} else {
|
||||||
logger->stdout(relPath);
|
logger->stdout_(relPath);
|
||||||
if (recursive) {
|
if (recursive) {
|
||||||
auto st = accessor->stat(curPath);
|
auto st = accessor->stat(curPath);
|
||||||
if (st.type == FSAccessor::Type::tDirectory)
|
if (st.type == FSAccessor::Type::tDirectory)
|
||||||
|
|
|
@ -25,7 +25,7 @@ struct CmdShowConfig : Command, MixJSON
|
||||||
std::map<std::string, Config::SettingInfo> settings;
|
std::map<std::string, Config::SettingInfo> settings;
|
||||||
globalConfig.getSettings(settings);
|
globalConfig.getSettings(settings);
|
||||||
for (auto & s : settings)
|
for (auto & s : settings)
|
||||||
logger->stdout("%s = %s", s.first, s.second.value);
|
logger->stdout_("%s = %s", s.first, s.second.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -152,7 +152,7 @@ struct CmdWhyDepends : SourceExprCommand
|
||||||
auto pathS = store->printStorePath(node.path);
|
auto pathS = store->printStorePath(node.path);
|
||||||
|
|
||||||
assert(node.dist != inf);
|
assert(node.dist != inf);
|
||||||
logger->stdout("%s%s%s%s" ANSI_NORMAL,
|
logger->stdout_("%s%s%s%s" ANSI_NORMAL,
|
||||||
firstPad,
|
firstPad,
|
||||||
node.visited ? "\e[38;5;244m" : "",
|
node.visited ? "\e[38;5;244m" : "",
|
||||||
firstPad != "" ? "→ " : "",
|
firstPad != "" ? "→ " : "",
|
||||||
|
|
Loading…
Reference in a new issue