Skip to content

Commit 917f99f

Browse files
committed
Fix package selection logic to match by package name instead of version; improve error handling for package retrieval.
1 parent ac13464 commit 917f99f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-update-cli",
3-
"version": "2.1.1",
3+
"version": "2.1.2",
44
"description": "command line tool for react-native-update (remote updates for react native)",
55
"main": "index.js",
66
"bin": {

src/package.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export const packageCommands = {
232232
if (!allPkgs) {
233233
throw new Error(t('noPackagesFound', { appId }));
234234
}
235-
const selectedPackage = allPkgs.find((pkg) => pkg.version === packageVersion);
235+
const selectedPackage = allPkgs.find((pkg) => pkg.name === packageVersion);
236236
if (!selectedPackage) {
237237
throw new Error(t('packageNotFound', { packageVersion }));
238238
}

0 commit comments

Comments
 (0)