@@ -200,10 +200,10 @@ async function install (gyp, argv) {
200
200
// download the tarball and extract!
201
201
// Ommited on Windows if only new node.lib is required
202
202
203
- // on Windows there can be file errors from tar if parallel installs
203
+ // there can be file errors from tar if parallel installs
204
204
// are happening (not uncommon with multiple native modules) so
205
205
// extract the tarball to a temp directory first and then copy over
206
- const tarExtractDir = win ? await fs . mkdtemp ( path . join ( os . tmpdir ( ) , 'node-gyp-tmp-' ) ) : devDir
206
+ const tarExtractDir = await fs . mkdtemp ( path . join ( os . tmpdir ( ) , 'node-gyp-tmp-' ) )
207
207
208
208
try {
209
209
if ( shouldDownloadTarball ) {
@@ -277,17 +277,13 @@ async function install (gyp, argv) {
277
277
}
278
278
279
279
// copy over the files from the temp tarball extract directory to devDir
280
- if ( tarExtractDir !== devDir ) {
281
- await copyDirectory ( tarExtractDir , devDir )
282
- }
280
+ await copyDirectory ( tarExtractDir , devDir )
283
281
} finally {
284
- if ( tarExtractDir !== devDir ) {
285
- try {
286
- // try to cleanup temp dir
287
- await fs . rm ( tarExtractDir , { recursive : true , maxRetries : 3 } )
288
- } catch {
289
- log . warn ( 'failed to clean up temp tarball extract directory' )
290
- }
282
+ try {
283
+ // try to cleanup temp dir
284
+ await fs . rm ( tarExtractDir , { recursive : true , maxRetries : 3 } )
285
+ } catch {
286
+ log . warn ( 'failed to clean up temp tarball extract directory' )
291
287
}
292
288
}
293
289
0 commit comments