mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-09-16 01:41:37 +08:00
Fix package selection logic to match by package name instead of version; improve error handling for package retrieval.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-update-cli",
|
||||
"version": "2.1.1",
|
||||
"version": "2.1.2",
|
||||
"description": "command line tool for react-native-update (remote updates for react native)",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
|
@@ -232,7 +232,7 @@ export const packageCommands = {
|
||||
if (!allPkgs) {
|
||||
throw new Error(t('noPackagesFound', { appId }));
|
||||
}
|
||||
const selectedPackage = allPkgs.find((pkg) => pkg.version === packageVersion);
|
||||
const selectedPackage = allPkgs.find((pkg) => pkg.name === packageVersion);
|
||||
if (!selectedPackage) {
|
||||
throw new Error(t('packageNotFound', { packageVersion }));
|
||||
}
|
||||
|
Reference in New Issue
Block a user