repositories
/
benchmarks-js.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
761ff1f
)
fix: use conditional import in prepare.mjs
author
Jérôme Benoit
<jerome.benoit@piment-noir.org>
Mon, 27 Nov 2023 17:03:22 +0000
(18:03 +0100)
committer
Jérôme Benoit
<jerome.benoit@piment-noir.org>
Mon, 27 Nov 2023 17:03:22 +0000
(18:03 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
prepare.mjs
patch
|
blob
|
blame
|
history
diff --git
a/prepare.mjs
b/prepare.mjs
index 9a107a6ea078e1f8bb0bb1c09a12346daab9585f..768ba5bb0626ddeee91a36cdac76c35fdcf9b746 100644
(file)
--- a/
prepare.mjs
+++ b/
prepare.mjs
@@
-1,8
+1,13
@@
import { env } from 'node:process'
-// eslint-disable-next-line n/no-unpublished-import
-import { install } from 'husky'
const isCIEnvironment = env.CI != null
if (isCIEnvironment === false) {
- install()
+ // eslint-disable-next-line n/no-unpublished-import
+ import('husky')
+ .then(({ install }) => {
+ return install()
+ })
+ .catch(err => {
+ console.error(err)
+ })
}