X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=scripts%2Freset-password.ts;h=6372095d6da633568abb363de8155b39b4eb79c2;hb=a7299d9d855caf11d8bb0bab1b1b5e0fb19d9476;hp=6126c3cd09fa9da04c57b1c52852ad3196627f66;hpb=2aaa1a3fdc49be77aec5309dab5507865c38d392;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/reset-password.ts b/scripts/reset-password.ts index 6126c3cd0..6372095d6 100755 --- a/scripts/reset-password.ts +++ b/scripts/reset-password.ts @@ -2,7 +2,7 @@ import { registerTSPaths } from '../server/helpers/register-ts-paths' registerTSPaths() import * as program from 'commander' -import { initDatabaseModels } from '../server/initializers' +import { initDatabaseModels } from '../server/initializers/database' import { UserModel } from '../server/models/account/user' import { isUserPasswordValid } from '../server/helpers/custom-validators/users' @@ -21,7 +21,7 @@ initDatabaseModels(true) }) .then(user => { if (!user) { - console.error('User unknown.') + console.error('Unknown user.') process.exit(-1) } @@ -53,3 +53,7 @@ initDatabaseModels(true) .finally(() => process.exit(0)) }) }) + .catch(err => { + console.error(err) + process.exit(-1) + })