1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 01:51:47 +02:00

nix run using $SHELL as default command

This commit is contained in:
mlatus 2020-04-07 20:29:40 +08:00
parent 5e7ccdc9e3
commit 9d04b5da17

View file

@ -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) {