#!/bin/sh

DIRECTORY="./node_modules"
if [ ! -d "$DIRECTORY" ]; then
  echo "Cannot find node_modules folder, please run 'npm install' first"
  exit -1
fi

if [ ! -x "$(command -v node)" ]; then
  echo "Node binary not found, please ensure it has been properly installed"
  exit -1
fi

./node_modules/.bin/pre-commit "$@"
