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) => {
1518
1518
1519
1519
const exec = ( cmd , args = [ ] ) =>
1520
1520
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
+ } ) ;
1522
1526
app . on ( "close" , ( code ) => {
1523
- if ( code !== 0 ) {
1527
+ if ( code !== 0 && ! stdout . includes ( "nothing to commit" ) ) {
1524
1528
err = new Error ( `Invalid status code: ${ code } ` ) ;
1525
1529
err . code = code ;
1526
1530
return reject ( err ) ;
Original file line number Diff line number Diff line change @@ -43,9 +43,13 @@ const toUrlFormat = (item) => {
43
43
44
44
const exec = ( cmd , args = [ ] ) =>
45
45
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
+ } ) ;
47
51
app . on ( "close" , ( code ) => {
48
- if ( code !== 0 ) {
52
+ if ( code !== 0 && ! stdout . includes ( "nothing to commit" ) ) {
49
53
err = new Error ( `Invalid status code: ${ code } ` ) ;
50
54
err . code = code ;
51
55
return reject ( err ) ;
You can’t perform that action at this time.
0 commit comments