Skip to content

Commit

Permalink
8289646: configure script failed on WSL
Browse files Browse the repository at this point in the history
Reviewed-by: ihse
  • Loading branch information
YaSuenag committed Jul 8, 2022
1 parent f804f2c commit 3f1174a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions make/scripts/fixpath.sh
Expand Up @@ -148,14 +148,13 @@ function import_path() {
if [[ "$path" != "" ]]; then
# Store current unix path
unixpath="$path"
# Now turn it into a windows path
winpath="$($PATHTOOL -w "$path" 2>/dev/null)"
# If it fails, try again with an added .exe (needed on WSL)
if [[ $? -ne 0 ]]; then
# If $unixpath does not exist, add .exe (needed on WSL)
if [[ ! -e "$unixpath" ]]; then
unixpath="$unixpath.exe"
winpath="$($PATHTOOL -w "$unixpath" 2>/dev/null)"
fi
if [[ $? -eq 0 ]]; then
# Now turn it into a windows path
winpath="$($PATHTOOL -w "$unixpath" 2>/dev/null)"
if [[ $? -eq 0 && -e "$unixpath" ]]; then
if [[ ! "$winpath" =~ ^"$ENVROOT"\\.*$ ]] ; then
# If it is not in envroot, it's a generic windows path
if [[ ! $winpath =~ ^[-_.:\\a-zA-Z0-9]*$ ]] ; then
Expand Down

1 comment on commit 3f1174a

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.