mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
dropEmptyInitThenConcatStringsSep -> concatStringSep: break nix help "" "" "" build
Garbage in, error out. Experimental CLI. Zero derivations given.
This commit is contained in:
parent
062672b022
commit
d9043021df
1 changed files with 2 additions and 2 deletions
|
@ -240,7 +240,7 @@ struct NixArgs : virtual MultiCommand, virtual MixCommonArgs, virtual RootArgs
|
||||||
lowdown. */
|
lowdown. */
|
||||||
static void showHelp(std::vector<std::string> subcommand, NixArgs & toplevel)
|
static void showHelp(std::vector<std::string> subcommand, NixArgs & toplevel)
|
||||||
{
|
{
|
||||||
auto mdName = subcommand.empty() ? "nix" : fmt("nix3-%s", dropEmptyInitThenConcatStringsSep("-", subcommand));
|
auto mdName = subcommand.empty() ? "nix" : fmt("nix3-%s", concatStringsSep("-", subcommand));
|
||||||
|
|
||||||
evalSettings.restrictEval = false;
|
evalSettings.restrictEval = false;
|
||||||
evalSettings.pureEval = false;
|
evalSettings.pureEval = false;
|
||||||
|
@ -275,7 +275,7 @@ static void showHelp(std::vector<std::string> subcommand, NixArgs & toplevel)
|
||||||
|
|
||||||
auto attr = vRes->attrs()->get(state.symbols.create(mdName + ".md"));
|
auto attr = vRes->attrs()->get(state.symbols.create(mdName + ".md"));
|
||||||
if (!attr)
|
if (!attr)
|
||||||
throw UsageError("Nix has no subcommand '%s'", dropEmptyInitThenConcatStringsSep("", subcommand));
|
throw UsageError("Nix has no subcommand '%s'", concatStringsSep("", subcommand));
|
||||||
|
|
||||||
auto markdown = state.forceString(*attr->value, noPos, "while evaluating the lowdown help text");
|
auto markdown = state.forceString(*attr->value, noPos, "while evaluating the lowdown help text");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue