Merge branch 'master' into update-drivelist-6.4.0

This commit is contained in:
Lorenzo Alberto Maria Ambrosi 2018-08-06 18:04:51 +02:00 committed by GitHub
commit 6a0198639f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -515,6 +515,12 @@ class ImageWriter extends EventEmitter {
const pipeline = this._createVerifyPipeline(destination) const pipeline = this._createVerifyPipeline(destination)
pipeline.on('error', (error) => { pipeline.on('error', (error) => {
// NOTE: As the `blockmap` module doesn't set our custom error codes,
// we need to patch `EVALIDATION` into a range checksum error here
if (error.message && error.message.startsWith('Invalid checksum for range')) {
error.code = 'EVALIDATION'
this.emit('fail', { device: destination.device.device, error })
}
this.emit('error', error) this.emit('error', error)
}) })