From 459839604c40c4a206616db196ce22d01080b546 Mon Sep 17 00:00:00 2001 From: Akash Manohar J Date: Sun, 14 Dec 2014 22:25:21 +0530 Subject: [PATCH] Check for exec-env and call it to get env vars --- lib/asdf.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/asdf.sh b/lib/asdf.sh index a1053e67..c2a2e115 100755 --- a/lib/asdf.sh +++ b/lib/asdf.sh @@ -43,8 +43,15 @@ exec_command() { local install_path=$(get_install_path $package $install_type $version) - local exec_env=$(${source_path}/bin/exec-env $install_type $version $install_path) - eval $exec_env ${install_path}/${executable_path} ${@:3} + + + if [ -f ${source_path}/bin/exec-env ] + then + local exec_env=$(${source_path}/bin/exec-env $install_type $version $install_path) + eval $exec_env ${install_path}/${executable_path} ${@:3} + else + ${install_path}/${executable_path} ${@:3} + fi }