Set MOD_DIR correctly

This commit is contained in:
aram price 2020-08-14 15:58:50 -07:00
parent a45748f020
commit 87b9ff2131
1 changed files with 4 additions and 4 deletions

View File

@ -51,10 +51,10 @@ function with_modules() {
for mod_file in $(find . -maxdepth 4 -name go.mod | sort); do for mod_file in $(find . -maxdepth 4 -name go.mod | sort); do
mod_dir="$(dirname "${mod_file}")" mod_dir="$(dirname "${mod_file}")"
( (
export MOD_DIR="$(pwd)" export MOD_DIR
echo "=> " && \ echo "=> "
echo " cd ${mod_dir} && ${cmd}" && \ echo " cd ${mod_dir} && ${cmd}"
cd "${mod_dir}" && ${cmd} cd "${mod_dir}" && MOD_DIR="$(pwd)" && ${cmd}
) )
done done
popd popd