From: Jérôme Benoit Date: Mon, 27 Nov 2023 17:04:35 +0000 (+0100) Subject: fix: fix cf push by conditionnaly importing husky X-Git-Tag: v1.2.27~11 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=9a2f0d41a10c7b6850f9d47a47213c4e39f2f02f;p=e-mobility-charging-stations-simulator.git fix: fix cf push by conditionnaly importing husky Signed-off-by: Jérôme Benoit --- diff --git a/prepare.js b/prepare.js index 8c299a62..f5d01054 100644 --- a/prepare.js +++ b/prepare.js @@ -1,10 +1,8 @@ import { env } from 'node:process'; -// eslint-disable-next-line n/no-unpublished-import -import { install } from 'husky'; - const isCIEnvironment = env.CI !== undefined; const isCFEnvironment = env.VCAP_APPLICATION !== undefined; if (isCFEnvironment === false && isCIEnvironment === false) { - install(); + // eslint-disable-next-line n/no-unpublished-import + import('husky').then(({ install }) => install()); }