Skip to content

Commit 306f361

Browse files
tydeukim-em
authored andcommitted
fix: lake: MSYS2 OSTYPE change (#7209)
This PR fixes broken Lake tests on Windows' new MSYS2. As of MSYS2 0.0.20250221, `OSTYPE` is now reported as `cygwin` instead of `msys`, which must be accounted for in a few Lake tests. See https://www.msys2.org/news/#2025-02-14-moving-msys2-closer-to-cygwin for more details.
1 parent 7d37175 commit 306f361

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/lake/examples/scripts/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -exo pipefail
33

44
# make prefix `/` behave on MSYS2
5-
[ "$OSTYPE" == "msys" ] && export MSYS2_ARG_CONV_EXCL=*
5+
[ "$OSTYPE" == "cygwin" -o "$OSTYPE" == "msys" ] && export MSYS2_ARG_CONV_EXCL=*
66

77
./clean.sh
88
LAKE=${LAKE:-../../.lake/build/bin/lake}

src/lake/examples/targets/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -exo pipefail
33

44
# Prevent MSYS2 from automatically transforming path-like targets
5-
[ "$OSTYPE" == "msys" ] && export MSYS2_ARG_CONV_EXCL=*
5+
[ "$OSTYPE" == "cygwin" -o "$OSTYPE" == "msys" ] && export MSYS2_ARG_CONV_EXCL=*
66

77
LAKE=${LAKE:-../../.lake/build/bin/lake}
88

src/lake/tests/init/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ $LAKE -d 123-hello exe 123-hello
122122
# https://github.com/leanprover/lean4/issues/2999
123123

124124
# the unicode name is improperly encoded on windows for non-Lake reasons
125-
if [ "$OSTYPE" != "msys" ]; then
125+
if [ "$OSTYPE" != "cygwin" -a "$OSTYPE" != "msys" ]; then
126126
$LAKE new «A.B».«C.D»
127127
$LAKE -d A-B-C-D exe a-b-c-d
128128
fi

0 commit comments

Comments
 (0)