Skip to content

Commit

Permalink
Revert "fix: ensure tarball is extracted correctly"
Browse files Browse the repository at this point in the history
This reverts commit 8023c08.
  • Loading branch information
sumwatshade committed Jun 2, 2021
1 parent f974883 commit d941769
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/commands/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default class UpdateCommand extends Command {
this.debug(`Updating to ${this.updatedVersion}`)
const reason = await this.skipUpdate()
if (reason) cli.action.stop(reason || 'done')
else await this.update(manifest, this.channel)
else await this.update(manifest)
this.debug('tidy')
await this.tidy()
await this.config.runHook('update', {channel: this.channel})
Expand Down Expand Up @@ -147,20 +147,19 @@ export default class UpdateCommand extends Command {
}

const http: typeof HTTP = require('http-call').HTTP
const gzUrl = !this.updatedVersion && manifest.gz ? manifest.gz : this.config.s3Url(this.config.s3Key('versioned', {
version: this.updatedVersion,
const gzUrl = manifest.gz || this.config.s3Url(this.config.s3Key('versioned', {
version,
channel,
bin: this.config.bin,
platform: this.config.platform,
arch: this.config.arch,
ext: '.tar.gz',
ext: 'gz',
}))

const {response: stream} = await http.stream(gzUrl)
stream.pause()

const baseDir = manifest.baseDir || this.config.s3Key('baseDir', {
version: this.updatedVersion,
version,
channel,
bin: this.config.bin,
platform: this.config.platform,
Expand Down Expand Up @@ -402,4 +401,3 @@ ${binPathEnvVar}="\$DIR/${bin}" ${redirectedEnvVar}=1 "$DIR/../${version}/bin/${
}
}
}

0 comments on commit d941769

Please sign in to comment.