From 7eb5f8cd32d507604584231cb78c60ee74501862 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Fri, 11 May 2018 10:59:02 +0200 Subject: [PATCH] fix reject --- server/tools/import-videos.ts | 5 ++--- 1 file 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 = { } async function promptPassword () { - return new Promise ( res => { + return new Promise ( (res, rej) => { prompt.start() const schema = { properties: { @@ -58,8 +58,7 @@ async function promptPassword () { } prompt.get(schema, function (err, result) { if (err) { - console.log(err.message) - return res(); + return rej(err); } return res(result.password) }) -- 2.25.1