From 306eb57ae56630ce4d0fabcb202f08729784f683 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Mon, 21 Jun 2021 15:56:37 -0500 Subject: [PATCH] build: check for npx before calling --- pkg/interface/.husky/pre-commit | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/interface/.husky/pre-commit b/pkg/interface/.husky/pre-commit index 006147ab7..2d03534b2 100755 --- a/pkg/interface/.husky/pre-commit +++ b/pkg/interface/.husky/pre-commit @@ -1,4 +1,10 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -cd pkg/interface && npx lint-staged \ No newline at end of file +cd pkg/interface + +command -v npx > /dev/null || { + exit 0 +} + +npx lint-staged \ No newline at end of file