machines/projects/Printhead/firmware/node/src/_cli.ts
2023-11-12 21:43:05 +01:00

13 lines
388 B
TypeScript

// tweaks and handlers
export const defaults = () => {
// default command
const DefaultCommand = 'summary';
if (process.argv.length === 2) {
process.argv.push(DefaultCommand);
}
// currently no default handler, display only :
process.on('unhandledRejection', (reason: string) => {
console.error('Unhandled rejection, reason: ', reason);
});
};