@@ -162,7 +162,10 @@ gpg: pinentry launched
162162Inappropriate ioctl for device` ,
163163 } ) ;
164164
165- const gpg = new GpgWrapper ( { pinentryMode : 'loopback' as any } ) ;
165+ const gpg = new GpgWrapper ( {
166+ pinentryMode : 'loopback' ,
167+ binaryPathOverride : '/usr/bin/gpg'
168+ } ) ;
166169 const res = await gpg . encryptFile ( {
167170 inputPath : 'in.csv' ,
168171 outputPath : 'out.gpg' ,
@@ -184,6 +187,7 @@ Inappropriate ioctl for device`,
184187 armor : true ,
185188 trustAlways : true ,
186189 pinentryMode : 'loopback' as any ,
190+ binaryPathOverride : '/usr/bin/gpg' ,
187191 } ) ;
188192 const res = await gpg . encryptFile ( {
189193 inputPath : 'in.csv' ,
@@ -211,7 +215,7 @@ Inappropriate ioctl for device`,
211215 status : null , signal : null , error : Object . assign ( new Error ( 'ETIMEDOUT' ) , { code : 'ETIMEDOUT' } )
212216 } as any ) ;
213217
214- const gpg = new GpgWrapper ( ) ;
218+ const gpg = new GpgWrapper ( { binaryPathOverride : '/usr/bin/gpg' } ) ;
215219 const res = await gpg . encryptFile ( { inputPath : 'in.csv' , outputPath : 'out.gpg' , recipient : 'RECIP' } ) ;
216220 expect ( res . success ) . toBe ( false ) ;
217221 if ( ! res . success ) expect ( res . error ) . toMatch ( / t i m e d o u t / i) ;
@@ -223,7 +227,7 @@ Inappropriate ioctl for device`,
223227 status : null , signal : null , error : Object . assign ( new Error ( 'qwerty' ) , { code : 'qwerty' } )
224228 } as any ) ;
225229
226- const gpg = new GpgWrapper ( ) ;
230+ const gpg = new GpgWrapper ( { binaryPathOverride : '/usr/bin/gpg' } ) ;
227231 const res = await gpg . encryptFile ( { inputPath : 'in.csv' , outputPath : 'out.gpg' , recipient : 'RECIP' } ) ;
228232 expect ( res . success ) . toBe ( false ) ;
229233 if ( ! res . success ) expect ( res . error ) . toMatch ( / t e r m i n a t e d w i t h o u t a n e x i t s t a t u s / i) ;
0 commit comments