From 9a2f0d41a10c7b6850f9d47a47213c4e39f2f02f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 27 Nov 2023 18:04:35 +0100 Subject: [PATCH] fix: fix cf push by conditionnaly importing husky MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- prepare.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/prepare.js b/prepare.js index 8c299a621..f5d010549 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()); }