We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6441dd commit 5c69caeCopy full SHA for 5c69cae
create-db/index.js
@@ -820,7 +820,7 @@ export async function main() {
820
}
821
822
823
-// Only run main() if this file is being executed directly, not when imported
824
-if (import.meta.url === `file://${process.argv[1]}`) {
825
- main();
+// Run main() if this file is being executed directly
+if (import.meta.url.endsWith('/index.js') || process.argv[1] === import.meta.url.replace('file://', '')) {
+ main().catch(console.error);
826
0 commit comments