diff options
author | Lukas Larsson <lukas@erlang.org> | 2020-01-23 13:21:26 +0100 |
---|---|---|
committer | Dan Gudmundsson <dgud@erlang.org> | 2020-01-24 12:06:18 +0100 |
commit | a6ac3098027dc2eeb3506cf9ae4cc43be225222c (patch) | |
tree | 5411fa42a9263913457d97f7b3403bfcf382d34d /otp_build | |
parent | 5371e92a72e54407e2c466b8fb64306200817a32 (diff) | |
download | erlang-a6ac3098027dc2eeb3506cf9ae4cc43be225222c.tar.gz |
kernel: Find executable from WSLPATH on windows
Diffstat (limited to 'otp_build')
-rwxr-xr-x | otp_build | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -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 () |