Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(fix/refactor): rewrite some overbroad try/catches
- so there's less silent failures that occur but don't error - replace overbroad try/catch in getProjectPath with just an fs.pathExists - replace overbroad try/catch in cleanDistFolder with just an fs.remove - fs.remove is like rimraf and `rm -rf` in that it won't error if the file/dir doesn't exist - if it does error, it's probably because it *failed* to remove the dir, and that should error, because it's potentially a problem, especially if you're publishing right after - rewrite moveTypes() so it doesn't have an overbroad try/catch - use fs.pathExists first and early return if it doesn't exist - only check for known errors with fs.copy, and rethrow others - this way if copy or remove actually fail, they will actually error - before they would silently fail, which could similarly be pretty bad if one were to publish right after a silent failure
- Loading branch information