mirror of
https://github.com/NixOS/nix
synced 2025-07-01 08:28:00 +02:00
refactor: RAII logger suspension
This commit is contained in:
parent
880489051a
commit
30694b5d8a
7 changed files with 46 additions and 35 deletions
|
@ -351,8 +351,7 @@ struct GitInputScheme : InputScheme
|
|||
|
||||
if (commitMsg) {
|
||||
// Pause the logger to allow for user input (such as a gpg passphrase) in `git commit`
|
||||
logger->pause();
|
||||
Finally restoreLogger([]() { logger->resume(); });
|
||||
auto suspension = logger->suspend();
|
||||
runProgram("git", true,
|
||||
{ "-C", repoPath->string(), "--git-dir", repoInfo.gitDir, "commit", std::string(path.rel()), "-F", "-" },
|
||||
*commitMsg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue