mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-12-02 13:29:23 -06:00
fix reject
This commit is contained in:
parent
e2b9d0ca56
commit
7eb5f8cd32
@ -46,7 +46,7 @@ const processOptions = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function promptPassword () {
|
async function promptPassword () {
|
||||||
return new Promise ( res => {
|
return new Promise ( (res, rej) => {
|
||||||
prompt.start()
|
prompt.start()
|
||||||
const schema = {
|
const schema = {
|
||||||
properties: {
|
properties: {
|
||||||
@ -58,8 +58,7 @@ async function promptPassword () {
|
|||||||
}
|
}
|
||||||
prompt.get(schema, function (err, result) {
|
prompt.get(schema, function (err, result) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(err.message)
|
return rej(err);
|
||||||
return res();
|
|
||||||
}
|
}
|
||||||
return res(result.password)
|
return res(result.password)
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user