Skip to content

Commit

Permalink
fix(migration): show proper error message when the file has code issues
Browse files Browse the repository at this point in the history
  • Loading branch information
binoy14 authored and bjoerge committed Jan 30, 2024
1 parent 2568666 commit 7256f85
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ function resolveMigrationScript(workDir: string, migrationName: string) {
// eslint-disable-next-line import/no-dynamic-require
mod = require(absolutePath)
} catch (err) {
// console.error(err)
if (err.code !== 'MODULE_NOT_FOUND') {
throw new Error(`Error: ${err.message}"`)
}
}
return {relativePath, absolutePath, mod}
}),
Expand Down

0 comments on commit 7256f85

Please sign in to comment.