-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Self-service
- I'd be willing to implement a fix
Describe the bug
yarn init -2
created a git repo inside my git repo :-/
To reproduce
Steps:
- I created a fresh git repo on GitHub
- I clone it on my machine, enabled corepack
- I created a subfolder and invoked
yarn init -2
inside it (100% sure yarn v4 was invoked, I got clear messages about version 4.x.y)
-🪲 yarn created a git repo inside my git repo
Environment
System:
OS: macOS 15.5
CPU: (8) arm64 Apple M2
Binaries:
Node: 24.4.0 - /private/var/folders/dv/_cxsbt9x6xj5695nk5qgz1f00000gp/T/xfs-1d9c87b5/node
Yarn: 4.9.2 - /private/var/folders/dv/_cxsbt9x6xj5695nk5qgz1f00000gp/T/xfs-1d9c87b5/yarn
npm: 11.4.2 - ~/.nvm/versions/node/v24.4.0/bin/npm
Additional context
A quick check of not being already in a git repo should be performed. Aside my example above, creating a new package/workspace in a monorepo would face the same issue.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working