-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Self-service
- I'd be willing to implement a fix
Describe the bug
Yarn 4.12.0 fixed git 2.52.0's invalid key: core.autocrlf error. However, it has introduced regression in the log error output.
Compare the two outputs below.
4.11.0 error message. It clearly indicates the error as
➤ YN0001: package@[email protected]:redacted/redacted.git#workspace=redacted&commit=0b78f8194a979956fccda000630f6d8364429444: Failed cloning the repository
Failed cloning the repository
➤ YN0001: Repository URL: ssh://[email protected]/redacted/redacted.git
➤ YN0001: Error: invalid key: core.autocrlf
➤ YN0001: Fatal Error: unable to write parameters to config file
➤ YN0001: Exit Code: 128
However, on 4.12.0, we see this:
➤ YN0000: │ /tmp/xfs-ad231f63 STDOUT Internal Error: redacted@[email protected]:redacted/redacted.git#commit=d69a48a832d647965a05205cf643751de2730f97: Failed cloning the repository
➤ YN0000: │ /tmp/xfs-ad231f63 STDOUT at RH (/home/runner/.cache/node/corepack/v1/yarn/4.7.0/yarn.js:529:10062)
➤ YN0000: │ /tmp/xfs-ad231f63 STDOUT at async /home/runner/.cache/node/corepack/v1/yarn/4.7.0/yarn.js:529:7533
It seems there's an unhandled exception during the clone and it's affecting the error outputs.
Errors are out of order, and doesn't contain the actual error message which makes it impossible to find the error root cause.
To reproduce
In GitHub Actions:
- Update yarn version in the
package.jsonto"packageManager": "[email protected]", - Install yarn using corepack.
npm i -g corepack,corepack enable,yarn -v - Install some repositories using the git syntax.
yarn add foo@git+ssh://[email protected]/owner/repo.git. - If the target git repository contains
packageManagerfield set and uses yarn < 4.12.0, then corepack automatically uses that version instead of the current yarn version. So users will see above error.
Environment
System:
OS: macOS 26.1
CPU: (10) arm64 Apple M1 Pro
Binaries:
Node: 22.21.1 - /private/var/folders/kb/zbm7kc491ng1mw5wqk8b97kw0000gn/T/xfs-9b4b2ff6/node
Yarn: 4.12.0 - /private/var/folders/kb/zbm7kc491ng1mw5wqk8b97kw0000gn/T/xfs-9b4b2ff6/yarnAdditional context
git version must be 2.52.0 to reproduce the error.
sworna13
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working