diff options
author | John Livingston <git@john-livingston.fr> | 2018-05-11 10:59:02 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-11 15:23:50 +0200 |
commit | 7eb5f8cd32d507604584231cb78c60ee74501862 (patch) | |
tree | bb5fbfcb72cf817bbf11784ef1ed1d1eed9882a5 | |
parent | e2b9d0ca5665b05997b1051fb434226b75664fcb (diff) | |
download | PeerTube-7eb5f8cd32d507604584231cb78c60ee74501862.tar.gz PeerTube-7eb5f8cd32d507604584231cb78c60ee74501862.tar.zst PeerTube-7eb5f8cd32d507604584231cb78c60ee74501862.zip |
fix reject
-rw-r--r-- | server/tools/import-videos.ts | 5 |
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 | ||
48 | async function promptPassword () { | 48 | async 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 | }) |