@@ -31,10 +31,10 @@ function exec(command, options = {}) {
3131// and returns path to its 'dist' directory.
3232function prepareBenchmarkProjects ( revisionList ) {
3333 const tmpDir = path . join ( os . tmpdir ( ) , 'graphql-js-benchmark' ) ;
34- fs . mkdirSync ( tmpDir , { recursive : true } ) ;
34+ fs . mkdirSync ( tmpDir ) ;
3535
3636 const setupDir = path . join ( tmpDir , 'setup' ) ;
37- fs . rmdirSync ( setupDir , { recursive : true } ) ;
37+ fs . rmdirSync ( setupDir , { recursive : true , force : true } ) ;
3838 fs . mkdirSync ( setupDir ) ;
3939
4040 return revisionList . map ( ( revision ) => {
@@ -72,12 +72,12 @@ function prepareBenchmarkProjects(revisionList) {
7272 }
7373
7474 const repoDir = path . join ( tmpDir , hash ) ;
75- fs . rmdirSync ( repoDir , { recursive : true } ) ;
75+ fs . rmdirSync ( repoDir , { recursive : true , force : true } ) ;
7676 fs . mkdirSync ( repoDir ) ;
7777 exec ( `git archive "${ hash } " | tar -xC "${ repoDir } "` ) ;
7878 exec ( 'npm --quiet ci' , { cwd : repoDir } ) ;
7979 fs . renameSync ( buildNPMArchive ( repoDir ) , archivePath ) ;
80- fs . rmdirSync ( repoDir , { recursive : true } ) ;
80+ fs . rmdirSync ( repoDir , { recursive : true , force : true } ) ;
8181 return archivePath ;
8282 }
8383
0 commit comments