There was an error while loading. Please reload this page.
1 parent 54218f5 commit e0068fcCopy full SHA for e0068fc
airbyte-webapp/.husky/pre-commit
@@ -1 +1,10 @@
1
-cd airbyte-webapp && npx --no lint-staged
+# Only run this pre-commit hook when npx is actually in the path.
2
+# Since CI will fail on misformated frontend code we consider this hook optional
3
+# and don't want to fail if the system doesn't have the requirements to run it.
4
+if command -v npx &> /dev/null; then
5
+ # Only run if `npx` is at least version 8, since earlier versions didn't support the --no flag
6
+ npxMajorVersion=$(npx --version | cut -d. -f1)
7
+ if [ "$npxMajorVersion" -ge "8" ]; then
8
+ cd airbyte-webapp && npx --no lint-staged
9
+ fi
10
+fi
0 commit comments