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
mod_dir="$(dirname "${mod_file}")"
(
export MOD_DIR="$(pwd)"
echo "=> " && \
echo " cd ${mod_dir} && ${cmd}" && \
cd "${mod_dir}" && ${cmd}
export MOD_DIR
echo "=> "
echo " cd ${mod_dir} && ${cmd}"
cd "${mod_dir}" && MOD_DIR="$(pwd)" && ${cmd}
)
done
popd