Skip to content

open-pr: avoid caching error 127 #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

dscho
Copy link
Member

@dscho dscho commented Feb 21, 2023

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 <johannes.schindelin@gmx.de>
@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 <johannes.schindelin@gmx.de>
@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