mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
11 lines
221 B
TypeScript
11 lines
221 B
TypeScript
import {Logger} from "../squid"
|
|
|
|
export function runner(fn: () => Promise<any>) {
|
|
fn()
|
|
.then(() => process.exit(0))
|
|
.catch((e) => {
|
|
Logger.error(e)
|
|
process.exit(1)
|
|
})
|
|
}
|