Skip to content

Commit c2209d1

Browse files
committed
fix: check on auto mode for the yarn version
1 parent 3ead827 commit c2209d1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/cli/src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ particularly ESM-related module resolution issues.`,
191191
const pm = detectPackageManager();
192192
if (pm) {
193193
packageManager = pm.name;
194+
195+
if (pm.name === "yarn") {
196+
const yarnVersion = pm.version.split(".")[0];
197+
opts.pm = yarnVersion === "1" ? "yarn-classic" : "yarn-modern";
198+
}
194199
}
195200
break;
196201
case "pnpm": {

0 commit comments

Comments
 (0)