diff --git a/CHANGELOG.md b/CHANGELOG.md index 61d11f4a..89d8ed96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Update request-progress to v2.0.1 [Pablo] + # v2.7.1 * Use multiArgs to promisify gosuper requests [Pablo] diff --git a/package.json b/package.json index 73747aa5..799d5586 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "pinejs-client": "^2.4.0", "pubnub": "^3.7.13", "request": "^2.51.0", - "request-progress": "^0.3.1", + "request-progress": "^2.0.1", "resin-register-device": "^2.0.0", "rimraf": "^2.5.4", "rwlock": "^5.0.0", diff --git a/src/docker-utils.coffee b/src/docker-utils.coffee index 89b7cd3b..8b1936f3 100644 --- a/src/docker-utils.coffee +++ b/src/docker-utils.coffee @@ -74,7 +74,8 @@ do -> new Promise (resolve, reject) -> progress request.get("#{config.deltaHost}/api/v2/delta?src=#{imgSrc}&dest=#{imgDest}", timeout: DELTA_REQUEST_TIMEOUT) .on 'progress', (progress) -> - onProgress(percentage: progress.percent) + # In request-progress ^2.0.1, "percentage" is a ratio from 0 to 1 + onProgress(percentage: progress.percentage * 100) .on 'end', -> onProgress(percentage: 100) .on 'response', (res) ->