aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tools/import-videos.ts
diff options
context:
space:
mode:
authorJohn Livingston <git@john-livingston.fr>2018-05-11 10:59:02 +0200
committerChocobozzz <me@florianbigard.com>2018-05-11 15:23:50 +0200
commit7eb5f8cd32d507604584231cb78c60ee74501862 (patch)
treebb5fbfcb72cf817bbf11784ef1ed1d1eed9882a5 /server/tools/import-videos.ts
parente2b9d0ca5665b05997b1051fb434226b75664fcb (diff)
downloadPeerTube-7eb5f8cd32d507604584231cb78c60ee74501862.tar.gz
PeerTube-7eb5f8cd32d507604584231cb78c60ee74501862.tar.zst
PeerTube-7eb5f8cd32d507604584231cb78c60ee74501862.zip
fix reject
Diffstat (limited to 'server/tools/import-videos.ts')
-rw-r--r--server/tools/import-videos.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/tools/import-videos.ts b/server/tools/import-videos.ts
index b0f7f7d4f..678503a3e 100644
--- a/server/tools/import-videos.ts
+++ b/server/tools/import-videos.ts
@@ -46,7 +46,7 @@ const processOptions = {
46} 46}
47 47
48async function promptPassword () { 48async function promptPassword () {
49 return new Promise ( res => { 49 return new Promise ( (res, rej) => {
50 prompt.start() 50 prompt.start()
51 const schema = { 51 const schema = {
52 properties: { 52 properties: {
@@ -58,8 +58,7 @@ async function promptPassword () {
58 } 58 }
59 prompt.get(schema, function (err, result) { 59 prompt.get(schema, function (err, result) {
60 if (err) { 60 if (err) {
61 console.log(err.message) 61 return rej(err);
62 return res();
63 } 62 }
64 return res(result.password) 63 return res(result.password)
65 }) 64 })