Skip to content

Commit 78d6c9b

Browse files
committed
Use sort.exe located in the same directory as comm.exe
Windows does not have comm.exe, but it does have sort.exe. However, the default Windows sort.exe is always case-insensitive, so its outputs is not suitable for input to UNIX-like `comm` tool.
1 parent 5f725bf commit 78d6c9b

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/windows.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,12 @@ jobs:
114114
# https://github.com/actions/virtual-environments/issues/712#issuecomment-613004302
115115
run: |
116116
::- Set up VC ${{ matrix.vc }}
117-
set | coreutils sort > old.env
117+
118+
::- Using sort.exe located in the same directory as comm.exe
119+
::- should probably work just fine.
120+
for %%I in (comm.exe) do set "sort=%%~dp$PATH:I\sort.exe"
121+
122+
set | "%sort%" > old.env
118123
call ..\src\win32\vssetup.cmd ^
119124
-arch=${{ matrix.target || 'amd64' }} ^
120125
${{ matrix.vcvars && '-vcvars_ver=' || '' }}${{ matrix.vcvars }}
@@ -124,8 +129,8 @@ jobs:
124129
set MAKEFLAGS=l
125130
set /a TEST_JOBS=(15 * %NUMBER_OF_PROCESSORS% / 10) > nul
126131
set RUBY_OPT_DIR=%GITHUB_WORKSPACE:\=/%/src/vcpkg_installed/%VCPKG_DEFAULT_TRIPLET%
127-
set | coreutils sort > new.env
128-
coreutils comm -13 old.env new.env >> %GITHUB_ENV%
132+
set | "%sort%" > new.env
133+
comm -13 old.env new.env >> %GITHUB_ENV%
129134
del *.env
130135
131136
- name: baseruby version

0 commit comments

Comments
 (0)