1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

Merge pull request #4233 from Kha/master

nix develop: Preserve stdin with `-c`
This commit is contained in:
Eelco Dolstra 2020-11-10 10:51:48 +01:00 committed by GitHub
commit 3f680c1dcc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

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();