#!/bin/bash

if [ -z "$1" ]; then
  echo "Usage: $0 <file>"
  exit 1
fi

if [[ "$(uname)" != "Darwin" ]]; then
  echo "Not on macOS, skipping leaks lex check."
  exit 0
fi

leaks --atExit -- ./herb lex "$1"
