mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 09:38:16 -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
|
if [ -f ${plugin_path}/bin/exec-env ]; then
|
||||||
(
|
export ASDF_INSTALL_TYPE=$install_type
|
||||||
export ASDF_INSTALL_TYPE=$install_type
|
export ASDF_INSTALL_VERSION=$version
|
||||||
export ASDF_INSTALL_VERSION=$version
|
export ASDF_INSTALL_PATH=$install_path
|
||||||
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 everything, we don't want to pollute
|
||||||
unset ASDF_INSTALL_TYPE
|
unset ASDF_INSTALL_TYPE
|
||||||
unset ASDF_INSTALL_VERSION
|
unset ASDF_INSTALL_VERSION
|
||||||
unset ASDF_INSTALL_PATH
|
unset ASDF_INSTALL_PATH
|
||||||
|
exec ${install_path}/${executable_path} "${@:3}"
|
||||||
${install_path}/${executable_path} "${@:3}"
|
|
||||||
)
|
|
||||||
else
|
else
|
||||||
(
|
exec ${install_path}/${executable_path} "${@:3}"
|
||||||
${install_path}/${executable_path} "${@:3}"
|
|
||||||
)
|
|
||||||
fi
|
fi
|
||||||
|
@ -49,7 +49,7 @@ write_shim_script() {
|
|||||||
cp $plugin_shims_path/$executable_name $shim_path
|
cp $plugin_shims_path/$executable_name $shim_path
|
||||||
else
|
else
|
||||||
echo """#!/usr/bin/env bash
|
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
|
""" > $shim_path
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user