diff --git a/src/updater.js b/src/updater.js index cb286a4be..670434e39 100644 --- a/src/updater.js +++ b/src/updater.js @@ -176,7 +176,10 @@ async function updateBox(boxUpdateInfo, options, progressCallback) { debug(`Updating box with ${boxUpdateInfo.sourceTarballUrl}`); progressCallback({ percent: 70, message: 'Installing update...' }); const [error] = await safe(shell.sudo([ UPDATE_CMD, packageInfo.file, process.stdout.logFile ], {})); // run installer.sh from new box code as a separate service - if (error) await locks.release(locks.TYPE_BOX_UPDATE); + if (error) { + await locks.release(locks.TYPE_BOX_UPDATE); + throw new BoxError(BoxError.EXTERNAL_ERROR, 'Update failed. Check logs for more information.'); + } // Do not add any code here. The installer script will stop the box code any instant }