summaryrefslogtreecommitdiff
path: root/otp_build
diff options
context:
space:
mode:
authorLukas Larsson <lukas@erlang.org>2020-01-23 13:21:26 +0100
committerDan Gudmundsson <dgud@erlang.org>2020-01-24 12:06:18 +0100
commita6ac3098027dc2eeb3506cf9ae4cc43be225222c (patch)
tree5411fa42a9263913457d97f7b3403bfcf382d34d /otp_build
parent5371e92a72e54407e2c466b8fb64306200817a32 (diff)
downloaderlang-a6ac3098027dc2eeb3506cf9ae4cc43be225222c.tar.gz
kernel: Find executable from WSLPATH on windows
Diffstat (limited to 'otp_build')
-rwxr-xr-xotp_build19
1 files changed, 18 insertions, 1 deletions
diff --git a/otp_build b/otp_build
index 8f611240e7..2027896446 100755
--- a/otp_build
+++ b/otp_build
@@ -811,7 +811,24 @@ setup_win32_cl_env ()
echo_setenv LIB "$LIB" ';'
echo_setenv LIBPATH "$LIBPATH" ';'
echo_setenv VCToolsRedistDir "$VCToolsRedistDir" ';'
- echo_setenv WSLENV "$WSLENV" ';'
+ echo_setenv WSLENV "$WSLENV:WSLPATH/l:CLASSPATH/l" ';'
+
+ save_ifs=$IFS
+ IFS=:
+ WSLPATH=""
+ for p in $PATH; do
+ if [ -d "$p" ]; then
+ case "$p" in
+ /mnt/c/*)
+ WSLPATH=$WSLPATH:$p
+ ;;
+ *)
+ ;;
+ esac
+ fi
+ done
+ IFS=$save_ifs
+ echo_setenv WSLPATH "$WSLPATH" ';'
}
lookup_prog_in_path ()