Remove useless returns and unused parameter

Change-type: patch
This commit is contained in:
Alexis Svinartchouk 2019-04-22 18:24:50 +02:00
parent 2c5f5004cc
commit 63c047009f

View File

@ -200,8 +200,7 @@ exports.performWrite = (image, drives, onProgress) => {
imagePath: image,
destinations: drives,
validateWriteOnSuccess: settings.get('validateWriteOnSuccess'),
unmountOnSuccess: settings.get('unmountOnSuccess'),
checksumAlgorithms: [ 'xxhash' ]
unmountOnSuccess: settings.get('unmountOnSuccess')
})
})
@ -259,14 +258,14 @@ exports.performWrite = (image, drives, onProgress) => {
})
}
return resolve(flashResults)
resolve(flashResults)
}).catch((error) => {
// This happens when the child is killed using SIGKILL
const SIGKILL_EXIT_CODE = 137
if (error.code === SIGKILL_EXIT_CODE) {
error.code = 'ECHILDDIED'
}
return reject(error)
reject(error)
}).finally(() => {
console.log('Terminating IPC server')
terminateServer()