@@ -207,12 +207,13 @@ export default class GitShellOutStrategy {
207
207
* Execute a git command that may create a commit. If the command fails because the GPG binary was invoked and unable
208
208
* to acquire a passphrase (because the pinentry program attempted to use a tty), retry with a `GitPromptServer`.
209
209
*/
210
- gpgExec ( args , { stdin } = { stdin : null } ) {
210
+ gpgExec ( args , options = { } ) {
211
211
const gpgArgs = [ '-c' , `gpg.program=${ GPG_HELPER_PATH } ` ] . concat ( args ) ;
212
- return this . exec ( gpgArgs , { stdin , writeOperation : true } ) . catch ( err => {
213
- if ( err . code === 128 && / g p g f a i l e d / . test ( err . stdErr ) ) {
212
+ return this . exec ( gpgArgs , options ) . catch ( err => {
213
+ if ( err . code === 128 && / g p g f a i l e d / . test ( err . stdErr ) && ! options . useGitPromptServer ) {
214
214
// Retry with a GitPromptServer
215
- return this . exec ( gpgArgs , { stdin, useGitPromptServer : true , writeOperation : true } ) ;
215
+ options . useGitPromptServer = true ;
216
+ return this . exec ( gpgArgs , options ) ;
216
217
} else {
217
218
throw err ;
218
219
}
@@ -415,7 +416,7 @@ export default class GitShellOutStrategy {
415
416
* Merge
416
417
*/
417
418
merge ( branchName ) {
418
- return this . gpgExec ( [ 'merge' , branchName ] ) ;
419
+ return this . gpgExec ( [ 'merge' , branchName ] , { writeOperation : true } ) ;
419
420
}
420
421
421
422
async isMerging ( ) {
0 commit comments