diff --git a/lib/src/writer.js b/lib/src/writer.js index 3d36aefe..e5ddec7b 100644 --- a/lib/src/writer.js +++ b/lib/src/writer.js @@ -93,7 +93,8 @@ exports.writeImage = function(image, drive, options, onProgress) { return exports.getImageStream(image); }).then(function(stream) { return imageWrite.write(drive.device, stream, { - check: options.validateWriteOnSuccess + check: options.validateWriteOnSuccess, + size: stream.length }); }).then(function(writer) { return new Bluebird(function(resolve, reject) { diff --git a/package.json b/package.json index 7af46cae..244d2fdd 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "lodash": "^4.5.1", "ngstorage": "^0.3.10", "open": "0.0.5", - "resin-image-write": "^3.0.4", + "resin-image-write": "^4.0.0", "resin-cli-errors": "^1.2.0", "resin-cli-form": "^1.4.1", "resin-cli-visuals": "^1.2.8",