Skip to content

Commit dda90f6

Browse files
Install latest available version if no matching version is found
In case CLI is version 1.4.x, on platform add we are trying to install latest available 1.4.x runtime. In case there's no 1.4.x version, the code fails. Instead we should install latest availabe version in this case.
1 parent 33e09a0 commit dda90f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/npm-installation-manager.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export class NpmInstallationManager implements INpmInstallationManager {
8484
.sortBy(verData => verData.patch)
8585
.value();
8686

87-
let result = _.last(compatibleVersions);
87+
let result = _.last(compatibleVersions) || this.getVersionData(latestVersion);
8888

8989
let latestCompatibleVersion = `${result.major}.${result.minor}.${result.patch}`;
9090
return latestCompatibleVersion;

0 commit comments

Comments
 (0)