Files
rules_bun/tests/script_test/run_env_script.sh
2026-03-15 13:54:18 +01:00

22 lines
395 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
binary="$1"
run_launcher() {
local launcher="$1"
shift
if [[ ${launcher} == *.cmd ]]; then
cmd.exe /c call "${launcher}" "$@" | tr -d '\r'
return 0
fi
"${launcher}" "$@"
}
output="$(run_launcher "${binary}")"
if [[ ${output} != "from-dotenv" ]]; then
echo "Expected .env value from package directory, got: ${output}" >&2
exit 1
fi