#!/usr/bin/env bash

# Runs `npx` through Yarn if necessary so that the environment variables are set up similarly across
# Yarn and npm.

# shellcheck disable=SC2154
if [[ ! "$npm_config_user_agent" =~ yarn ]]; then
  yarn exec --silent -- npx "$@"
else
  npx "$@"
fi
