Skip to content

Commit

Permalink
fix(cli): yarn set version 3 (#3621)
Browse files Browse the repository at this point in the history
  • Loading branch information
brunozoric authored and Pavel910 committed Oct 23, 2023
1 parent a2fcc98 commit 0b8c902
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/cli/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ const currentNodeVersion = process.versions.node;
try {
const { stdout } = await execa("yarn", ["--version"]);
if (!semver.satisfies(stdout, ">=2")) {
console.error(chalk.red(`"@webiny/cli" requires yarn >=2!`));
console.error(chalk.red(`"@webiny/cli" requires yarn 2 or 3!`));
process.exit(1);
}
} catch (err) {
console.error(chalk.red(`"@webiny/cli" requires yarn >=2!`));
console.error(chalk.red(`"@webiny/cli" requires yarn 2 or 3!`));
console.log(
`Run ${chalk.blue("yarn set version berry")} to install a compatible version of yarn.`
`Run ${chalk.blue("yarn set version 3")} to install a compatible version of yarn.`
);
process.exit(1);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/create-webiny-project/utils/createProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ module.exports = async function createProject({
// Setup yarn
title: "Setup yarn",
task: async () => {
await execa("yarn", ["set", "version", "berry"], { cwd: projectRoot });
await execa("yarn", ["set", "version", "3"], { cwd: projectRoot });

const yamlPath = path.join(projectRoot, ".yarnrc.yml");
const parsedYaml = yaml.load(fs.readFileSync(yamlPath, "utf-8"));
Expand Down

0 comments on commit 0b8c902

Please sign in to comment.