@@ -3,12 +3,12 @@ const fs = require('node:fs')
3
3
const http = require ( 'node:http' )
4
4
const { dirname, basename, resolve } = require ( 'node:path' )
5
5
const { mkdir } = require ( 'node:fs/promises' )
6
- const { rmSync } = require ( 'node:fs' )
7
6
const { spawn } = require ( 'node:child_process' )
8
7
const Arborist = require ( '@npmcli/arborist' )
9
8
const HostedGit = require ( 'hosted-git-info' )
10
9
const npa = require ( 'npm-package-arg' )
11
10
const spawnGit = require ( '@npmcli/git' ) . spawn
11
+ const rimraf = require ( 'rimraf' )
12
12
const tar = require ( 'tar' )
13
13
const spawnNpm = require ( '../lib/util/npm.js' )
14
14
const GitFetcher = require ( '../lib/git.js' )
@@ -229,7 +229,8 @@ t.test('setup', { bail: true, skip: isWindows && 'posix only' }, t => {
229
229
}
230
230
daemon . stderr . on ( 'data' , onDaemonData )
231
231
// 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 ) )
233
234
} )
234
235
235
236
t . test ( 'create a repo with a submodule' , ( ) => {
0 commit comments