File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -1518,9 +1518,13 @@ const toUrlFormat = (item) => {
15181518
15191519const exec = ( cmd , args = [ ] ) =>
15201520 new Promise ( ( resolve , reject ) => {
1521- const app = spawn ( cmd , args , { stdio : "inherit" } ) ;
1521+ const app = spawn ( cmd , args , { stdio : "pipe" } ) ;
1522+ let stdout = "" ;
1523+ app . stdout . on ( "data" , ( data ) => {
1524+ stdout = data ;
1525+ } ) ;
15221526 app . on ( "close" , ( code ) => {
1523- if ( code !== 0 ) {
1527+ if ( code !== 0 && ! stdout . includes ( "nothing to commit" ) ) {
15241528 err = new Error ( `Invalid status code: ${ code } ` ) ;
15251529 err . code = code ;
15261530 return reject ( err ) ;
Original file line number Diff line number Diff line change @@ -43,9 +43,13 @@ const toUrlFormat = (item) => {
4343
4444const exec = ( cmd , args = [ ] ) =>
4545 new Promise ( ( resolve , reject ) => {
46- const app = spawn ( cmd , args , { stdio : "inherit" } ) ;
46+ const app = spawn ( cmd , args , { stdio : "pipe" } ) ;
47+ let stdout = "" ;
48+ app . stdout . on ( "data" , ( data ) => {
49+ stdout = data ;
50+ } ) ;
4751 app . on ( "close" , ( code ) => {
48- if ( code !== 0 ) {
52+ if ( code !== 0 && ! stdout . includes ( "nothing to commit" ) ) {
4953 err = new Error ( `Invalid status code: ${ code } ` ) ;
5054 err . code = code ;
5155 return reject ( err ) ;
You can’t perform that action at this time.
0 commit comments