aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
authorSebastian Ullrich <sebasti@nullri.ch>2020-11-07 15:00:22 +0100
committerSebastian Ullrich <sebasti@nullri.ch>2020-11-09 22:43:14 +0100
commitfb7735e4cf3a1ee6337bf1f2ee15204bb11304b2 (patch)
tree4c4028fbfb3cbd42f797089b5db91e8da3a45ae7 /src/nix
parent387f824cab50682e373ade49dcec4e6f99c10a42 (diff)
nix develop: Preserve stdin with `-c`
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/develop.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix/develop.cc b/src/nix/develop.cc
index 8fea7ee9c..457d94382 100644
--- a/src/nix/develop.cc
+++ b/src/nix/develop.cc
@@ -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();