Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Diana Sentoso committed Jun 7, 2021
1 parent 6cecef6 commit d0a8e3e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/commands/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export default class InstallCommand extends UpdateCommand {
this.channel = channelUpdateRequested ? args.version : await this.determineChannel()
const versions = fs
.readdirSync(this.clientRoot)
.filter(dirOrFile => dirOrFile !== 'bin' && dirOrFile !== 'current')
.filter(dirOrFile => dirOrFile !== 'bin' && dirOrFile !== 'current')

const targetVersion = semver.clean(args.version) || args.version

if (versions.includes(targetVersion)) {
Expand All @@ -33,7 +33,7 @@ export default class InstallCommand extends UpdateCommand {
await this.config.runHook('preupdate', {channel: this.channel})
const manifest = await this.fetchManifest()
this.currentVersion = await this.determineCurrentVersion()

this.updatedVersion = (manifest as any).sha ? `${targetVersion}-${(manifest as any).sha}` : targetVersion
this.debug(`Updating to ${this.updatedVersion}`)
const reason = await this.skipUpdate()
Expand All @@ -42,11 +42,9 @@ export default class InstallCommand extends UpdateCommand {
this.debug('tidy')
await this.tidy()
await this.config.runHook('update', {channel: this.channel})

this.debug('done')
cli.action.stop()
}


}
}

0 comments on commit d0a8e3e

Please sign in to comment.