File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import path from 'node:path';
22import fs from 'node:fs' ;
33
44import { execute } from './execute.js' ;
5- import { addElemIf , appendPathIfItExists , prependPathIfItExists } from './utils.js' ;
5+ import { addElemIf , appendPathIfItExists , exists , prependPathIfItExists } from './utils.js' ;
66
77//const __dirname = dirname(fileURLToPath(import.meta.url));
88const cwd = process . cwd ( ) ;
@@ -24,8 +24,12 @@ async function buildDawnNode() {
2424 fs . copyFileSync ( 'scripts/standalone-with-node.gclient' , '.gclient' ) ;
2525 await execute ( 'gclient' , [ 'metrics' , '--opt-out' ] ) ;
2626 await execute ( 'gclient' , [ 'sync' ] ) ;
27- fs . mkdirSync ( 'out/cmake-release' , { recursive : true } ) ;
28- process . chdir ( 'out/cmake-release' ) ;
27+ const outDir = 'out/cmake-release' ;
28+ if ( exists ( outDir ) ) {
29+ fs . rmSync ( outDir , { recursive : true } ) ;
30+ }
31+ fs . mkdirSync ( outDir , { recursive : true } ) ;
32+ process . chdir ( outDir ) ;
2933
3034 await execute ( 'cmake' , [
3135 dawnPath ,
You can’t perform that action at this time.
0 commit comments