diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-04-08 19:35:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-08 19:35:39 +0200 |
commit | 5449ff7d8aaa8dce6d6f7e47c89e04d914f16cff (patch) | |
tree | 5cc44b6d48f3550b7d93d8016295491036b0d5eb | |
parent | bf81b3155998152582abdad1550277cf8ca32e92 (diff) | |
parent | 9d04b5da17898fd564308423bc7d10fc929efe18 (diff) |
Merge pull request #3477 from Ninlives/nix-run-using-env
`nix run` using $SHELL as default command
-rw-r--r-- | src/nix/run.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix/run.cc b/src/nix/run.cc index 8e30264c0..5334531fd 100644 --- a/src/nix/run.cc +++ b/src/nix/run.cc @@ -59,14 +59,14 @@ struct RunCommon : virtual Command struct CmdRun : InstallablesCommand, RunCommon, MixEnvironment { - std::vector<std::string> command = { "bash" }; + std::vector<std::string> command = { getEnv("SHELL").value_or("bash") }; CmdRun() { mkFlag() .longName("command") .shortName('c') - .description("command and arguments to be executed; defaults to 'bash'") + .description("command and arguments to be executed; defaults to '$SHELL'") .labels({"command", "args"}) .arity(ArityAny) .handler([&](std::vector<std::string> ss) { |