From a45748f02094f3cd24e5bf65b37dcc77c12682d3 Mon Sep 17 00:00:00 2001 From: aram price Date: Fri, 14 Aug 2020 15:06:46 -0700 Subject: [PATCH] `hack/module.sh` sets `MOD_DIR` for module tasks This is to allow tasks which need to be executed in a module-specific context to detect that they are being invoked appropriately. --- hack/module.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/hack/module.sh b/hack/module.sh index b9c248210..c0f343211 100755 --- a/hack/module.sh +++ b/hack/module.sh @@ -51,6 +51,7 @@ 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}