Skip to content

Commit

Permalink
fix: update command revert
Browse files Browse the repository at this point in the history
  • Loading branch information
sumwatshade committed Jun 2, 2021
1 parent e51fc48 commit 2edd0a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commands/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ export default class UpdateCommand extends Command {
await this.config.runHook('preupdate', {channel: this.channel})
const manifest = await this.fetchManifest()
this.currentVersion = await this.determineCurrentVersion()

this.updatedVersion = (manifest as any).sha ? `${manifest.version}-${(manifest as any).sha}` : manifest.version
this.debug(`Updating to ${this.updatedVersion}`)
const reason = await this.skipUpdate()
if (reason) cli.action.stop(reason || 'done')
else await this.update(manifest)
Expand Down Expand Up @@ -128,6 +126,8 @@ export default class UpdateCommand extends Command {
}

protected async downloadAndExtract(output: string, manifest: IManifest, channel: string) {
const {version} = manifest

const filesize = (n: number): string => {
const [num, suffix] = require('filesize')(n, {output: 'array'})
return num.toFixed(1) + ` ${suffix}`
Expand Down Expand Up @@ -232,7 +232,7 @@ export default class UpdateCommand extends Command {
return this.config.version
}

private s3ChannelManifestKey(bin: string, platform: string, arch: string, folder?: string): string {
protected s3ChannelManifestKey(bin: string, platform: string, arch: string, folder?: string): string {
let s3SubDir = folder || ''
if (s3SubDir !== '' && s3SubDir.slice(-1) !== '/') s3SubDir = `${s3SubDir}/`
return path.join(s3SubDir, 'channels', this.channel, `${bin}-${platform}-${arch}-buildmanifest`)
Expand Down

0 comments on commit 2edd0a4

Please sign in to comment.