#!/usr/bin/env bash
#
# brew-path - echo the expanded path to the given brew package

set -e

if [ -z "$1" ]; then
  printf '%s\n' "You must provide a brew package"
  exit 1
fi

brewpath=$(brew --prefix "$1")
# shellcheck disable=SC2005
# echo "$(realpath "${brewpath}")"
realpath "${brewpath}"
