mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
Don't spawn subshells, use exec
This commit is contained in:
parent
78d516d063
commit
aaa8abfd23
@ -48,22 +48,17 @@ fi
|
||||
|
||||
|
||||
if [ -f ${plugin_path}/bin/exec-env ]; then
|
||||
(
|
||||
export ASDF_INSTALL_TYPE=$install_type
|
||||
export ASDF_INSTALL_VERSION=$version
|
||||
export ASDF_INSTALL_PATH=$install_path
|
||||
export ASDF_INSTALL_TYPE=$install_type
|
||||
export ASDF_INSTALL_VERSION=$version
|
||||
export ASDF_INSTALL_PATH=$install_path
|
||||
|
||||
source ${plugin_path}/bin/exec-env
|
||||
source ${plugin_path}/bin/exec-env
|
||||
|
||||
# unset everything, we don't want to pollute
|
||||
unset ASDF_INSTALL_TYPE
|
||||
unset ASDF_INSTALL_VERSION
|
||||
unset ASDF_INSTALL_PATH
|
||||
|
||||
${install_path}/${executable_path} "${@:3}"
|
||||
)
|
||||
# unset everything, we don't want to pollute
|
||||
unset ASDF_INSTALL_TYPE
|
||||
unset ASDF_INSTALL_VERSION
|
||||
unset ASDF_INSTALL_PATH
|
||||
exec ${install_path}/${executable_path} "${@:3}"
|
||||
else
|
||||
(
|
||||
${install_path}/${executable_path} "${@:3}"
|
||||
)
|
||||
exec ${install_path}/${executable_path} "${@:3}"
|
||||
fi
|
||||
|
@ -49,7 +49,7 @@ write_shim_script() {
|
||||
cp $plugin_shims_path/$executable_name $shim_path
|
||||
else
|
||||
echo """#!/usr/bin/env bash
|
||||
$(asdf_dir)/bin/private/asdf-exec ${plugin_name} ${executable_path} \"\$@\"
|
||||
exec $(asdf_dir)/bin/private/asdf-exec ${plugin_name} ${executable_path} \"\$@\"
|
||||
""" > $shim_path
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user