]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/danger/clean/cleaner.ts
Fix lint
[github/Chocobozzz/PeerTube.git] / scripts / danger / clean / cleaner.ts
index 2d5366a9170ee21c090054405385cff33d039f68..69e8a63a0de7c3d5cdaf6a639fc478d72d8a992c 100644 (file)
@@ -14,7 +14,7 @@ initDatabaseModels(true)
     console.info('Tables of %s deleted.', CONFIG.DATABASE.DBNAME)
 
     const STORAGE = CONFIG.STORAGE
-    Promise.mapSeries(Object.keys(STORAGE), storage => {
+    return Promise.mapSeries(Object.keys(STORAGE), storage => {
       const storageDir = STORAGE[storage]
 
       return new Promise((res, rej) => {
@@ -28,3 +28,7 @@ initDatabaseModels(true)
     })
     .then(() => process.exit(0))
   })
+  .catch(err => {
+    console.error(err)
+    process.exit(-1)
+  })