File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,16 +39,14 @@ const child = spawn(
3939)
4040
4141child . on ( 'exit' , ( code , signal ) => {
42- if ( signal ) return Bare . exit ( 128 + signal )
43- if ( code !== 0 ) return Bare . exit ( code )
42+ Bare . exitCode = signal ? 128 + signal : code
43+ if ( code === 0 && ! signal ) {
44+ const src = path . join ( out , bin )
45+ const ext = isWindows ? '.exe' : ''
46+ const dest = path . join ( 'out' , 'make' , `pear-${ host } ${ ext } ` )
4447
45- const src = path . join ( out , bin )
46- const ext = isWindows ? '.exe' : ''
47- const dest = path . join ( 'out' , 'make' , `pear-${ host } ${ ext } ` )
48-
49- fs . mkdirSync ( path . dirname ( dest ) , { recursive : true } )
50- fs . copyFileSync ( src , dest )
51- fs . chmodSync ( dest , 0o755 )
52-
53- console . log ( `wrote ${ dest } ` )
48+ fs . mkdirSync ( path . dirname ( dest ) , { recursive : true } )
49+ fs . copyFileSync ( src , dest )
50+ fs . chmodSync ( dest , 0o755 )
51+ }
5452} )
You can’t perform that action at this time.
0 commit comments