Skip to content

Commit

Permalink
fix: pause/resume stream
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Apr 19, 2018
1 parent 357ea6f commit b937c61
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/commands/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export default class UpdateCommand extends Command {
const output = path.join(this.clientRoot, version)

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

let extraction = extract(stream, manifest.baseDir, output, manifest.sha256gz)

Expand All @@ -87,6 +88,7 @@ export default class UpdateCommand extends Command {
})
}

stream.resume()
await extraction

await this.createBin(version)
Expand Down

0 comments on commit b937c61

Please sign in to comment.