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