File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -436,7 +436,20 @@ class Target {
436436 ) ;
437437
438438 const electronWinstaller = require ( 'electron-winstaller' ) ;
439- await electronWinstaller . createWindowsInstaller ( this . installerOptions ) ;
439+
440+ // We monkey-patch the signtool.exe that comes with electron-winstaller
441+ // with our drop-in replace ment signtool.exe written in go so that
442+ // electron-winstaller will execute that. But it requires
443+ // @mongodb -js/signing-tools via node and that's only a dep of this
444+ // package. So change the working directory to packages/hadron-build so
445+ // that that would work.
446+ const oldCWD = process . cwd ( ) ;
447+ process . chdir ( path . join ( __dirname , '..' , '..' ) ) ;
448+ try {
449+ await electronWinstaller . createWindowsInstaller ( this . installerOptions ) ;
450+ } finally {
451+ process . chdir ( oldCWD ) ;
452+ }
440453
441454 await fs . promises . rename (
442455 this . dest ( 'RELEASES' ) ,
Original file line number Diff line number Diff line change @@ -66,9 +66,7 @@ func main() {
6666 if err != nil {
6767 fmt .Println ("Error signing the file" )
6868 fmt .Printf ("%s\n " , stdoutStderr )
69- fmt .Println (err )
70- // if we error out then we won't see much because of how electron-windows-installer fails
71- return
69+ log .Fatal (err )
7270 }
7371
7472 fmt .Println ("File signed successfully." )
You can’t perform that action at this time.
0 commit comments