diff --git a/package.json b/package.json index eb7e9e9fb..4d756105f 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "license": "MIT", "type": "module", "scripts": { - "preinstall": "pre-commit install", + "preinstall": "./preinstall.sh", "dev": "ts-node-esm src/index.ts", "build": "tsc && ncc build dist/index.js --minify && find dist/ -type f -not -name 'index.js' -delete", "lint": "biome lint" diff --git a/preinstall.sh b/preinstall.sh new file mode 100755 index 000000000..d41206624 --- /dev/null +++ b/preinstall.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# Check if CI variable is set to true +if [ "$CI" = "true" ]; then + echo "CI is true, skipping pre-commit install." +else + # Install pre-commit hooks + pre-commit install +fi