Skip to content

Commit

Permalink
Show better error when trying to update to specific package version
Browse files Browse the repository at this point in the history
  • Loading branch information
zodern committed Dec 21, 2023
1 parent 8d94099 commit fdd1e64
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tools/cli/commands-packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -1866,10 +1866,19 @@ main.registerCommand({
if (options["all-packages"]) {
Console.error("You cannot both specify a list of packages to"
+ " update and pass --all-packages.");
exit(1)
process.exit(1)
}

upgradePackageNames = options.args;

if (upgradePackageNames.some(name => name.includes("@"))) {
Console.error(
"Package names can not contain \"@\". If you are trying to",
"update a package to a specific version, instead use",
Console.command('"meteor add"')
);
process.exit(1);
}
}
// We want to use the project's release for constraints even if we are
// currently running a newer release (eg if we ran 'meteor update --patch' and
Expand Down

0 comments on commit fdd1e64

Please sign in to comment.