Skip to content

Commit

Permalink
fix: test downloadAndExtract
Browse files Browse the repository at this point in the history
  • Loading branch information
Diana Sentoso committed Jun 1, 2021
1 parent 8a7ab05 commit b5919bb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/commands/use.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ export default class UseCommand extends UpdateCommand {
const matchingLocalVersions = versions
.filter(version => version.includes(targetVersion))
.sort((a, b) => semver.compare(b, a))
const target = versions.includes(targetVersion) ? targetVersion : matchingLocalVersions[0]

if (versions.includes(targetVersion) || matchingLocalVersions.length > 0) {
const target = versions.includes(targetVersion) ? targetVersion : matchingLocalVersions[0]
await this.updateToExistingVersion(target)
this.currentVersion = await this.determineCurrentVersion()
this.updatedVersion = target
Expand Down
1 change: 0 additions & 1 deletion test/commands/use.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ describe('Use Command', () => {
bin: 'cli',
scopedEnvVarKey: jest.fn(),
scopedEnvVar: jest.fn(),

} as any
})

Expand Down

0 comments on commit b5919bb

Please sign in to comment.