nix develop: Preserve stdin with -c

This commit is contained in:
Sebastian Ullrich
2020-11-09 22:43:14 +01:00
parent 387f824cab
commit fb7735e4cf
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -474,9 +474,9 @@ struct CmdDevelop : Common, MixEnvironment
ignoreException();
}
// If running a phase, don't want an interactive shell running after
// If running a phase or single command, don't want an interactive shell running after
// Ctrl-C, so don't pass --rcfile
auto args = phase ? Strings{std::string(baseNameOf(shell)), rcFilePath}
auto args = phase || !command.empty() ? Strings{std::string(baseNameOf(shell)), rcFilePath}
: Strings{std::string(baseNameOf(shell)), "--rcfile", rcFilePath};
restoreAffinity();