Move process.exit outside of DependencyResolver

Summary:
node-haste shouldn't ever call process.exit and should leave it up to clients to shut down properly. This change just moves it out into the `Resolver` class – I'll leave it up to David and Martin to improve error handling for the rn packager :)

public

Reviewed By: davidaurelio

Differential Revision: D2889908

fb-gh-sync-id: 6f03162c44d89e268891ef71c8db784a6f2e081d
This commit is contained in:
Christoph Pojer
2016-02-02 18:09:45 -08:00
committed by facebook-github-bot-4
parent 5ca519de29
commit 55f4e55109
4 changed files with 21 additions and 18 deletions

View File

@@ -103,6 +103,11 @@ class Resolver {
});
this._polyfillModuleNames = opts.polyfillModuleNames || [];
this._depGraph.load().catch(err => {
console.error(err.message + '\n' + err.stack);
process.exit(1);
});
}
getShallowDependencies(entryFile) {