Skip to content

Commit 4f8ab85

Browse files
committed
fix: improve remix init error handling
Add error catching and logging to the initialization process to provide better feedback if something goes wrong during project setup Closes #943
1 parent 9542505 commit 4f8ab85

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

remix.init/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
module.exports = async (...args) => {
22
const { default: main } = await import('./index.mjs')
3-
await main(...args)
3+
await main(...args).catch((err) => {
4+
console.error('Oh no! Something went wrong initializing your epic app:')
5+
console.error(err)
6+
process.exit(1)
7+
})
48
}

remix.init/index.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ export default async function main({ rootDirectory }) {
9393
fs.rm(path.join(rootDirectory, 'docs'), { recursive: true }),
9494
fs.rm(path.join(rootDirectory, 'tests/e2e/notes.test.ts')),
9595
fs.rm(path.join(rootDirectory, 'tests/e2e/search.test.ts')),
96-
fs.rm(path.join(rootDirectory, '.github/workflows/version.yml')),
9796
]
9897

9998
await Promise.all(fileOperationPromises)

0 commit comments

Comments
 (0)