mirror of
https://github.com/pnpm/pnpm.git
synced 2026-05-05 06:28:47 -04:00
fix: don't try to rename folder after exception
This commit is contained in:
@@ -166,6 +166,10 @@ export default (
|
||||
}),
|
||||
waitTillClosed({ stream, size, getDownloaded: () => downloaded, url }),
|
||||
])
|
||||
.then((vals) => {
|
||||
return renameOverwrite(stage, opts.unpackTo)
|
||||
.then(() => resolve(vals[1]))
|
||||
})
|
||||
.catch((err) => {
|
||||
rimraf(stage, (err) => {
|
||||
// Just ignoring this error
|
||||
@@ -173,10 +177,6 @@ export default (
|
||||
})
|
||||
reject(err)
|
||||
})
|
||||
.then((vals) => {
|
||||
return renameOverwrite(stage, opts.unpackTo)
|
||||
.then(() => resolve(vals[1]))
|
||||
})
|
||||
})
|
||||
} catch (err) {
|
||||
err.attempts = currentAttempt
|
||||
|
||||
Reference in New Issue
Block a user