1#!/usr/bin/env bash 2 3# Runs `npx` through Yarn if necessary so that the environment variables are set up similarly across 4# Yarn and npm. 5 6# shellcheck disable=SC2154 7if [[ ! "$npm_config_user_agent" =~ yarn ]] && [ -x "$(command -v yarn)" ]; then 8 yarn exec -- npx "$@" 9else 10 npx "$@" 11fi 12