aboutsummaryrefslogtreecommitdiff
path: root/scripts/formatters/apheleia-npx
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/formatters/apheleia-npx')
-rwxr-xr-xscripts/formatters/apheleia-npx7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/formatters/apheleia-npx b/scripts/formatters/apheleia-npx
index a540f9b..72cafb2 100755
--- a/scripts/formatters/apheleia-npx
+++ b/scripts/formatters/apheleia-npx
@@ -70,4 +70,9 @@ if [[ -d $dir ]]; then
fi
# Fall back to executing the command if it's installed and on the user's $PATH
-exec "$@"
+if command -v "$1" >/dev/null; then
+ exec "$@"
+fi
+
+echo "apheleia-npx:formatter_not_available" >&2
+exit 100