@@ -3,12 +3,12 @@ const fs = require('node:fs')
33const http = require ( 'node:http' )
44const { dirname, basename, resolve } = require ( 'node:path' )
55const { mkdir } = require ( 'node:fs/promises' )
6- const { rmSync } = require ( 'node:fs' )
76const { spawn } = require ( 'node:child_process' )
87const Arborist = require ( '@npmcli/arborist' )
98const HostedGit = require ( 'hosted-git-info' )
109const npa = require ( 'npm-package-arg' )
1110const spawnGit = require ( '@npmcli/git' ) . spawn
11+ const rimraf = require ( 'rimraf' )
1212const tar = require ( 'tar' )
1313const spawnNpm = require ( '../lib/util/npm.js' )
1414const GitFetcher = require ( '../lib/git.js' )
@@ -229,7 +229,8 @@ t.test('setup', { bail: true, skip: isWindows && 'posix only' }, t => {
229229 }
230230 daemon . stderr . on ( 'data' , onDaemonData )
231231 // only clean up the dir once the daemon is banished
232- daemon . on ( 'close' , ( ) => rmSync ( me , { recursive : true , force : true } ) )
232+ // do NOT replace this with node's internal rmSync. It generates EBUSY errors in windows.
233+ daemon . on ( 'close' , ( ) => rimraf . sync ( me ) )
233234 } )
234235
235236 t . test ( 'create a repo with a submodule' , ( ) => {
0 commit comments