#!/bin/sh

# TODO: make this work natively on Windows

beginswith() { case $2 in "$1"*) true;; *) false;; esac; }

if beginswith 'rebase' "$GIT_REFLOG_ACTION"; then
  echo 'husky-hook::commit-msg: skipped pre-commit hook due to rebase'
  exit 0
fi

if [ -z "$GAC_VERIFY_SIMPLE" ]; then npm run lint:package; fi
NODE_NO_WARNINGS=1 lint-staged --concurrent false
