Skip to content

Commit

Permalink
Merge pull request #352 from garden-io/fix-ext-tools
Browse files Browse the repository at this point in the history
fix(ext-tools): handle end of stream event
  • Loading branch information
eysi09 authored Oct 31, 2018
2 parents 46123ae + 1a36b72 commit fc50a8e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions garden-service/src/util/ext-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ export class BinaryCmd extends Cmd {
// validate sha256 if provided
const sha256 = hash.read()

// end of stream event
if (sha256 === null) {
return
}

if (this.spec.sha256 && sha256 !== this.spec.sha256) {
reject(new DownloadError(
`Invalid checksum from ${this.spec.url} (got ${sha256})`,
Expand Down

0 comments on commit fc50a8e

Please sign in to comment.