Skip to content

Commit

Permalink
fix: pick always the last element from the list of installed packages (
Browse files Browse the repository at this point in the history
  • Loading branch information
derberg authored Mar 30, 2020
1 parent 859f11d commit 113e479
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ utils.isFileSystemPath = (string) => {
* @returns {Object}
*/
utils.beautifyNpmiResult = (result) => {
const [nameWithVersion, pkgPath] = result[0];
const [nameWithVersion, pkgPath] = result[result.length-1];
const nameWithVersionArray = nameWithVersion.split('@');
const version = nameWithVersionArray[nameWithVersionArray.length - 1];
const name = nameWithVersionArray.splice(0, nameWithVersionArray.length - 1).join('@');
Expand Down

0 comments on commit 113e479

Please sign in to comment.