mirror of
https://github.com/status-im/sourcecred.git
synced 2025-02-12 04:26:39 +00:00
23 lines
572 B
JavaScript
23 lines
572 B
JavaScript
|
// @flow
|
||
|
|
||
|
import {handlingErrors} from "./command";
|
||
|
import sourcecred from "./sourcecred";
|
||
|
|
||
|
require("../tools/entry");
|
||
|
|
||
|
export default function main(): Promise<void> {
|
||
|
return handlingErrors(sourcecred)(process.argv.slice(2), {
|
||
|
out: (x) => console.log(x),
|
||
|
err: (x) => console.error(x),
|
||
|
}).then((exitCode) => {
|
||
|
process.exitCode = exitCode;
|
||
|
});
|
||
|
}
|
||
|
|
||
|
// Only run in the Webpack bundle, not as a Node module (during tests).
|
||
|
/* istanbul ignore next */
|
||
|
/*:: declare var __webpack_require__: mixed; */
|
||
|
if (typeof __webpack_require__ !== "undefined") {
|
||
|
main();
|
||
|
}
|