Skip to content

open-pr: avoid caching error 127#35

Merged
dscho merged 2 commits into
git-for-windows:mainfrom
dscho:work-around-caching-problem-in-open-pr
Feb 21, 2023
Merged

open-pr: avoid caching error 127#35
dscho merged 2 commits into
git-for-windows:mainfrom
dscho:work-around-caching-problem-in-open-pr

Conversation

@dscho

@dscho dscho commented Feb 21, 2023

Copy link
Copy Markdown
Member

When the MSYS2-runtime version changed recently, the `msys-2.0.dll`
contents of the minimal SDK diverged from the contents of the same file
in the Git for Windows installation in `C:\Program Files`.

Since we adjust the `PATH` before caching, that matters because the
`gzip` executable that is found in the `PATH` by `tar -z` is the version
from the minimal SDK, which therefore insists on using the MSYS2 runtime
from the minimal SDK, while the `tar` executable used by @actions/cache
is the `C:\Program Files\Git\usr\bin\tar.exe` one and hence uses a
potentially-incompatible MSYS2 runtime version of the Git for Windows
installation.

In git-for-windows/msys2-runtime#48, we tried to
address this by teaching the MSYS2 runtime to avoid talking to a
different MSYS2 runtime version. But the indicator used in that Pull
Request is the version of the _Cygwin_ runtime on which it is based.
Which means that Git for Windows-only changes in the MSYS2 runtime are
not reflected in that indicator, and the MSYS2 runtime _still_ tries to
talk to the other version, and the only symptom the user gets is a terse
`Child returned status 127`.

Let's work around this here (taking the pressure off fixing the MSYS2
runtime logic) simply by adjusting the `PATH` only _after_ letting
@actions/cache do its thing.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
dscho requested a review from rimrul February 21, 2023 08:34
We need this tool for pushing (to be precise, to generate the
authorization header).

For the same reason as explained in 8d36b48 (open-pr: avoid caching
error 127, 2023-02-21) where the interplay of two incompatible MSYS2
runtime versions would cause an unhelpful exit code 127, calling Git for
Windows' `base64.exe` from the SDK subset's Bash should be avoided.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
dscho marked this pull request as draft February 21, 2023 08:48
@dscho
dscho marked this pull request as ready for review February 21, 2023 08:54
@dscho
dscho merged commit 75e23af into git-for-windows:main Feb 21, 2023
@dscho
dscho deleted the work-around-caching-problem-in-open-pr branch February 21, 2023 09:43
@dscho dscho self-assigned this Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants