Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ Examples:
process.exit(0);
}

// Check if the program is called with --init
if (process.argv.includes('--init')) {
const success = await createInteractiveConfig();
process.exit(success ? 0 : 1);
}
// Main async function to handle top-level await
(async () => {
// Check if the program is called with --init
if (process.argv.includes('--init')) {
const success = await createInteractiveConfig();
process.exit(success ? 0 : 1);
}

// Check if the program is called with --cleanup
if (process.argv.includes('--cleanup')) {
Expand Down Expand Up @@ -284,4 +286,5 @@ const main = async () => {
}
};

main();
await main();
})();
Loading