Skip to content

Commit

Permalink
fix: fix cf push by conditionnaly importing husky
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <[email protected]>
  • Loading branch information
Jérôme Benoit committed Nov 27, 2023
1 parent b4c9f3c commit 9a2f0d4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions prepare.js
Original file line number Diff line number Diff line change
@@ -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());
}

0 comments on commit 9a2f0d4

Please sign in to comment.