Explorar el Código

current status

karl.hudgell hace 4 años
padre
commit
96536414c0
Se han modificado 3 ficheros con 10 adiciones y 3 borrados
  1. 5 0
      package-lock.json
  2. 1 0
      package.json
  3. 4 3
      pages/pages.js

+ 5 - 0
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",

+ 1 - 0
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",

+ 4 - 3
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')