Repository navigation
Check if directories exist before removing during hoist - #568
Conversation
| FileSystemUtilities.rimraf(path.join(dir, name), cb); | ||
| const filePath = path.join(dir, name); | ||
| if (!FileSystemUtilities.existsSync(filePath)) return cb(); | ||
| FileSystemUtilities.rimraf(filePath, cb); |
There was a problem hiding this comment.
nit: as the same might happen in other places, would it be more reasonable to let FileSystemUtilities.rimraf handle the case?
There was a problem hiding this comment.
Yeah, that might be cleaner. Will be an unnecessary stat in most cases, but that's cheap.
There was a problem hiding this comment.
btw, i'd probably file a bug against rimraf as it claims to be an equivalent to rm -rf and it's not because -f makes rm to swallow the error while rimraf fails.
There was a problem hiding this comment.
It's not that it fails, it's just slow compared to calling rimraf in-process.
These noop rimrafs were cheap before lerna#547, but they're expensive now.
|
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
These noop rimrafs were cheap before #547, but they're expensive now.