Skip to content

Commit 8fb9d41

Browse files
author
Dirk Rudolph
committed
Instead of taking the first updated dependency, we resolve the one passed by userSpecifiedPackageName) (NativeScript#3217)
1 parent d4817bc commit 8fb9d41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/node-package-manager.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export class NodePackageManager implements INodePackageManager {
159159
// Considering that the dependency is already installed we should
160160
// find it in the `updated` key as a first element of the array.
161161
if (!name && npm5Output.updated) {
162-
const updatedDependency = npm5Output.updated[0];
162+
const updatedDependency = npm5Output.updated.find(dependencyInfo => dependencyInfo.name === userSpecifiedPackageName);
163163
return {
164164
name: updatedDependency.name,
165165
originalOutput,

0 commit comments

Comments
 (0)