File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 uses : ' ./'
1616 with :
1717 github_token : ' ${{ secrets.GITHUB_TOKEN }}'
18- branch : ' ${{ github.ref }}'
18+ branch : ' ${{ github.ref }}'
Original file line number Diff line number Diff line change @@ -4,7 +4,14 @@ const path = require("path");
44const exec = ( cmd , args = [ ] ) => new Promise ( ( resolve , reject ) => {
55 console . log ( `Started: ${ cmd } ${ args . join ( " " ) } ` )
66 const app = spawn ( cmd , args , { stdio : 'inherit' } ) ;
7- app . on ( 'close' , resolve ) ;
7+ app . on ( 'close' , code => {
8+ if ( code !== 0 ) {
9+ err = new Error ( `Invalid status code: ${ code } ` ) ;
10+ err . code = code ;
11+ return reject ( err ) ;
12+ } ;
13+ return resolve ( code ) ;
14+ } ) ;
815 app . on ( 'error' , reject ) ;
916} ) ;
1017
@@ -15,5 +22,5 @@ const main = async () => {
1522main ( ) . catch ( err => {
1623 console . error ( err ) ;
1724 console . error ( err . stack ) ;
18- process . exit ( - 1 ) ;
19- } )
25+ process . exit ( err . code || - 1 ) ;
26+ } )
You can’t perform that action at this time.
0 commit comments