mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-10-29 22:03:11 +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:
@@ -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