2
2
3
3
const path = require ( 'path' ) ;
4
4
5
- const execa = require ( 'execa' ) ;
6
5
const fs = require ( 'fs-extra' ) ;
7
6
const inquirer = require ( 'inquirer' ) ;
8
7
const Listr = require ( 'listr' ) ;
@@ -74,8 +73,8 @@ function commitSquashedBackport() {
74
73
messageBody += formatted + '\n\n' ;
75
74
}
76
75
}
77
- await ctx . execGitNode ( 'add' , 'deps/v8' ) ;
78
- await ctx . execGitNode ( 'commit' , '-m' , messageTitle , '-m' , messageBody ) ;
76
+ await ctx . execGitNode ( 'add' , [ 'deps/v8' ] ) ;
77
+ await ctx . execGitNode ( 'commit' , [ '-m' , messageTitle , '-m' , messageBody ] ) ;
79
78
}
80
79
} ;
81
80
} ;
@@ -86,8 +85,8 @@ function commitPatch(patch) {
86
85
task : async ( ctx ) => {
87
86
const messageTitle = formatMessageTitle ( [ patch ] ) ;
88
87
const messageBody = formatMessageBody ( patch , false ) ;
89
- await ctx . execGitNode ( 'add' , 'deps/v8' ) ;
90
- await ctx . execGitNode ( 'commit' , '-m' , messageTitle , '-m' , messageBody ) ;
88
+ await ctx . execGitNode ( 'add' , [ 'deps/v8' ] ) ;
89
+ await ctx . execGitNode ( 'commit' , [ '-m' , messageTitle , '-m' , messageBody ] ) ;
91
90
}
92
91
} ;
93
92
}
@@ -200,13 +199,10 @@ function applyPatchTask(patch) {
200
199
201
200
async function applyPatch ( ctx , patch ) {
202
201
try {
203
- await execa (
204
- 'patch' ,
205
- [ '-p1' , '--merge' , '--no-backup-if-mismatch' , '--directory=deps/v8' ] ,
206
- {
207
- cwd : ctx . nodeDir ,
208
- input : patch . data
209
- }
202
+ await ctx . execGitNode (
203
+ 'apply' ,
204
+ [ '-p1' , '--3way' , '--directory=deps/v8' ] ,
205
+ patch . data /* input */
210
206
) ;
211
207
} catch ( e ) {
212
208
patch . hadConflicts = true ;
@@ -246,7 +242,7 @@ function incrementEmbedderVersion() {
246
242
commonGypiPath ,
247
243
commonGypi . replace ( embedderRegex , embedderString )
248
244
) ;
249
- await ctx . execGitNode ( 'add' , 'common.gypi' ) ;
245
+ await ctx . execGitNode ( 'add' , [ 'common.gypi' ] ) ;
250
246
}
251
247
} ;
252
248
}
0 commit comments