diff --git a/package-lock.json b/package-lock.json index 4bd643f..b9dedf6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -503,6 +503,11 @@ "to-regex-range": "^5.0.1" } }, + "foreachasync": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/foreachasync/-/foreachasync-5.1.3.tgz", + "integrity": "sha512-q3/l5D2pyZG8aYe9xZQDAnS/KyP7QJakLUNrU/qGkd4bQUTzCUmvVFjagRggoxxjtb1ZrJB+jQeG4ojOLWkztw==" + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", diff --git a/package.json b/package.json index 8fb70dc..cb5cb1f 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "clui": "^0.3.6", "download-file-with-progressbar": "^1.2.3", "figlet": "^1.3.0", + "foreachasync": "^5.1.3", "fs": "0.0.1-security", "inquirer": "^7.1.0", "lodash": "^4.17.15", diff --git a/pages/pages.js b/pages/pages.js index 496f61f..e19869a 100644 --- a/pages/pages.js +++ b/pages/pages.js @@ -7,12 +7,13 @@ const files = require('../lib/files') module.exports = { removeApps: async () => { common.header('Remove Apps') - const value = await inquirer.removeAppsList(); - value.removeAppsList.forEach(element => { - shellExec('adb shell pm uninstall -k --user 0 ' + element).then(async function (result) { + const value = await inquirer.removeAppsList(); + value.removeAppsList.forEach(async (element) => { + await shellExec('adb shell pm uninstall -k --user 0 ' + element).then(async function (result) { console.log('Removing ' + element + ' - ' + result.stdout) }).catch() }); + console.log('complete') }, restoreApps: async () => { common.header('Restore Apps')