aboutsummaryrefslogtreecommitdiff
path: root/src/nix/run.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/run.cc')
-rw-r--r--src/nix/run.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nix/run.cc b/src/nix/run.cc
index ebfec36d9..b888281a5 100644
--- a/src/nix/run.cc
+++ b/src/nix/run.cc
@@ -63,16 +63,16 @@ struct CmdShell : InstallablesCommand, RunCommon, MixEnvironment
CmdShell()
{
- mkFlag()
- .longName("command")
- .shortName('c')
- .description("command and arguments to be executed; defaults to '$SHELL'")
- .labels({"command", "args"})
- .arity(ArityAny)
- .handler([&](std::vector<std::string> ss) {
+ addFlag({
+ .longName = "command",
+ .shortName = 'c',
+ .description = "command and arguments to be executed; defaults to '$SHELL'",
+ .labels = {"command", "args"},
+ .handler = {[&](std::vector<std::string> ss) {
if (ss.empty()) throw UsageError("--command requires at least one argument");
command = ss;
- });
+ }}
+ });
}
std::string description() override