From b70d160273fcdb9b5655a7252517a112ebb5e925 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Fri, 24 Apr 2026 08:19:24 +0900 Subject: [PATCH] Revert "gha: add hosts file workaround for Windows localhost resolution" This reverts commit eed32b752bd82e5ab183285b64939c4a7136cf78. Windows's Winsock getaddrinfo does not consult the hosts file for "localhost" because an internal hard-coded rule short-circuits first, so the Add-Content step had no effect on the failing tests. Remove the ineffective workaround now that a skip guard replaces it. Co-authored-by: Claude --- .github/workflows/build.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 74ba156bf..e9f186358 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,12 +38,6 @@ jobs: run: ruby -v - name: Compiler version run: ${{ env.CC }} --version - - name: Ensure localhost resolves on Windows - if: runner.os == 'Windows' - shell: pwsh - run: | - Add-Content -Path $env:WINDIR\System32\drivers\etc\hosts -Value "127.0.0.1 localhost" - Add-Content -Path $env:WINDIR\System32\drivers\etc\hosts -Value "::1 localhost" - name: Build and test run: rake -m test:run:serial @@ -85,11 +79,6 @@ jobs: persist-credentials: false - name: Ruby version run: ruby -v - - name: Ensure localhost resolves - shell: pwsh - run: | - Add-Content -Path $env:WINDIR\System32\drivers\etc\hosts -Value "127.0.0.1 localhost" - Add-Content -Path $env:WINDIR\System32\drivers\etc\hosts -Value "::1 localhost" - name: Build and test shell: cmd run: |