mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-12-20 02:15:12 -07:00
3492043241
Co-authored-by: James Hegedus <jthegedus@hey.com>
25 lines
385 B
Bash
25 lines
385 B
Bash
# -*- sh -*-
|
|
|
|
shim_env_command() {
|
|
local shim_name="$1"
|
|
local env_cmd="${2}"
|
|
local env_args=("${@:3}")
|
|
|
|
if [ -z "$shim_name" ]; then
|
|
printf "usage: asdf env <command>\n"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -z "$env_cmd" ]; then
|
|
env_cmd="env"
|
|
fi
|
|
|
|
shim_env() {
|
|
"$env_cmd" "${env_args[@]}"
|
|
}
|
|
|
|
with_shim_executable "$shim_name" shim_env || exit $?
|
|
}
|
|
|
|
shim_env_command "$@"
|