Skip to content

Commit

Permalink
fix: remove condition for yarn classic when bumping version
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonrybczak committed Nov 6, 2023
1 parent 4881bf9 commit bc0dc7d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/cli/src/commands/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ const YARN_VERSION = '3.6.4';
const bumpYarnVersion = async (silent: boolean, root: string) => {
try {
let yarnVersion = semver.parse(getYarnVersionIfAvailable());
if (yarnVersion && semver.major(yarnVersion) === 1) {

if (yarnVersion) {
await executeCommand('yarn', ['set', 'version', YARN_VERSION], {
root,
silent,
Expand Down Expand Up @@ -433,7 +434,7 @@ export default (async function initialize(
}

if (doesDirectoryExist(projectFolder)) {
throw new DirectoryAlreadyExistsError(projectFolder);
throw new DirectoryAlreadyExistsError(directoryName);
} else {
fs.mkdirSync(projectFolder, {recursive: true});
}
Expand Down

0 comments on commit bc0dc7d

Please sign in to comment.