Return args as part of task.get

the ui needs this to repair any failed app task
This commit is contained in:
Girish Ramakrishnan
2019-11-23 18:06:31 -08:00
parent f543b98764
commit 6774514bd2
3 changed files with 4 additions and 11 deletions

View File

@@ -648,6 +648,9 @@ function checkAppState(app, state) {
if (app.taskId) return new BoxError(BoxError.BAD_STATE, `Not allowed in this app state : ${app.installationState} / ${app.runState}`);
if (app.installationState === exports.ISTATE_ERROR) {
if (app.error.installationState === state) return null;
// allow uninstall from any state
if (state !== exports.ISTATE_PENDING_UNINSTALL) return new BoxError(BoxError.BAD_STATE, 'Not allowed in error state');
}