@@ -2,7 +2,6 @@ import path from 'node:path';
22import { promises as fs } from 'node:fs' ;
33
44import Enquirer from 'enquirer' ;
5- import { execa } from 'execa' ;
65import { Listr } from 'listr2' ;
76
87import { getCurrentV8Version } from './common.js' ;
@@ -16,6 +15,7 @@ import {
1615} from './util.js' ;
1716import applyNodeChanges from './applyNodeChanges.js' ;
1817import { chromiumGit , v8Deps } from './constants.js' ;
18+ import { runAsync } from '../run.js' ;
1919
2020export default function majorUpdate ( ) {
2121 return {
@@ -54,7 +54,7 @@ function checkoutBranch() {
5454 '--sort' ,
5555 'version:refname'
5656 ) ;
57- const tags = res . stdout . split ( '\n' ) . filter ( isVersionString ) ;
57+ const tags = res . split ( '\n' ) . filter ( isVersionString ) ;
5858 const lastTag = tags [ tags . length - 1 ] ;
5959 if ( lastTag ) version = lastTag ;
6060 if ( version . split ( '.' ) . length === 3 ) {
@@ -88,8 +88,8 @@ function cloneLocalV8() {
8888 return {
8989 title : 'Clone branch to deps/v8' ,
9090 task : ( ctx ) =>
91- execa ( 'git' , [ 'clone' , '-b' , ctx . branch , ctx . v8Dir , 'deps/v8' ] , {
92- cwd : ctx . nodeDir
91+ runAsync ( 'git' , [ 'clone' , '-b' , ctx . branch , ctx . v8Dir , 'deps/v8' ] , {
92+ spawnArgs : { cwd : ctx . nodeDir }
9393 } )
9494 } ;
9595}
@@ -106,8 +106,8 @@ function addDepsV8() {
106106 title : 'Track all files in deps/v8' ,
107107 // Add all V8 files with --force before updating DEPS. We have to do this
108108 // because some files are checked in by V8 despite .gitignore rules.
109- task : ( ctx ) => execa ( 'git' , [ 'add' , '--force' , 'deps/v8' ] , {
110- cwd : ctx . nodeDir
109+ task : ( ctx ) => runAsync ( 'git' , [ 'add' , '--force' , 'deps/v8' ] , {
110+ spawnArgs : { cwd : ctx . nodeDir }
111111 } )
112112 } ;
113113}
@@ -166,6 +166,6 @@ async function fetchFromGit(cwd, repo, commit) {
166166 await removeDirectory ( path . join ( cwd , '.git' ) ) ;
167167
168168 function exec ( ...options ) {
169- return execa ( 'git' , options , { cwd } ) ;
169+ return runAsync ( 'git' , options , { spawnArgs : { cwd } } ) ;
170170 }
171171}
0 commit comments