redmine-time-manager/src/logic/index.ts
Pavel Gnedov 83fded6ab8 dev
2022-02-06 23:58:17 +07:00

24 lines
No EOL
434 B
TypeScript

import {printHelpMsg} from './help';
import {args} from './args';
import {save} from "./save";
async function main() {
try {
if (args['help']) {
printHelpMsg();
}
const cmd = args['cmd'];
if (cmd === 'save') {
await save();
} else {
printHelpMsg();
}
} catch (e) {
console.error('Ошибка при выполнении:', e);
process.exit(1);
}
process.exit(0);
}
main();