Skip to content

Commit

Permalink
units: Avoid unexpected pathname conversion on MSYS2
Browse files Browse the repository at this point in the history
MSYS2 wrongly handles regex options as Unix style path, and convert it
to MS-DOS style path. Setting MSYS2_ARG_CONV_EXCL avoids it.
See: http://sourceforge.net/p/msys2/wiki/Porting/#filesystem-namespaces
  • Loading branch information
k-takata committed Aug 12, 2015
1 parent 9c23bca commit a2101d6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions misc/units
Original file line number Diff line number Diff line change
Expand Up @@ -1869,6 +1869,12 @@ EOF
prepare_environment ()
{
LC_ALL="C"; export LC_ALL

# Avoid unexpected pathname conversion on MSYS2.
# http://sourceforge.net/p/msys2/wiki/Porting/#filesystem-namespaces
if test `uname -o` -eq "Msys"; then
MSYS2_ARG_CONV_EXCL='--regex-'; export MSYS2_ARG_CONV_EXCL
fi
}

main ()
Expand Down

0 comments on commit a2101d6

Please sign in to comment.