Skip to content

Commit 49d356b

Browse files
committed
Try catch import in cli
1 parent 8db4e19 commit 49d356b

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

cli.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,13 @@ const main = async () => {
9999
try {
100100
require(f)
101101
} catch (ex) {
102-
/* eslint-disable no-unused-expressions */
103-
import(pathToFileURL(f))
104-
/* eslint-enable no-unused-expressions */
102+
try {
103+
/* eslint-disable no-unused-expressions */
104+
import(pathToFileURL(f))
105+
/* eslint-enable no-unused-expressions */
106+
} catch (ex) {
107+
logFailedImport(ex)
108+
}
105109
}
106110
} catch (ex) {
107111
logFailedImport(ex)

0 commit comments

Comments
 (0)