diff options
author | Florent <florent.git@zeteo.me> | 2022-07-26 09:31:26 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2022-07-26 10:00:17 +0200 |
commit | 3efa4da1fef44400931c3db47dc27a92da77062e (patch) | |
tree | 40310f32e735ff4da6972b9111b29829009ffa9e /server | |
parent | 9e2a4af3a0d21f93ebc042e0be3666fed947f894 (diff) | |
download | PeerTube-3efa4da1fef44400931c3db47dc27a92da77062e.tar.gz PeerTube-3efa4da1fef44400931c3db47dc27a92da77062e.tar.zst PeerTube-3efa4da1fef44400931c3db47dc27a92da77062e.zip |
Fix password for root in dev mode
password should remain "test" in dev mode for root.
Fix regression of 9452d4fd33 which introduces NODE_ENV=dev
Diffstat (limited to 'server')
-rw-r--r-- | server/initializers/installer.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/initializers/installer.ts b/server/initializers/installer.ts index 0364bdbe5..7d5919459 100644 --- a/server/initializers/installer.ts +++ b/server/initializers/installer.ts | |||
@@ -10,6 +10,7 @@ import { applicationExist, clientsExist, usersExist } from './checker-after-init | |||
10 | import { CONFIG } from './config' | 10 | import { CONFIG } from './config' |
11 | import { FILES_CACHE, HLS_STREAMING_PLAYLIST_DIRECTORY, LAST_MIGRATION_VERSION, RESUMABLE_UPLOAD_DIRECTORY } from './constants' | 11 | import { FILES_CACHE, HLS_STREAMING_PLAYLIST_DIRECTORY, LAST_MIGRATION_VERSION, RESUMABLE_UPLOAD_DIRECTORY } from './constants' |
12 | import { sequelizeTypescript } from './database' | 12 | import { sequelizeTypescript } from './database' |
13 | import { isTestOrDevInstance } from '@server/helpers/core-utils' | ||
13 | 14 | ||
14 | async function installApplication () { | 15 | async function installApplication () { |
15 | try { | 16 | try { |
@@ -135,8 +136,8 @@ async function createOAuthAdminIfNotExist () { | |||
135 | let validatePassword = true | 136 | let validatePassword = true |
136 | let password = '' | 137 | let password = '' |
137 | 138 | ||
138 | // Do not generate a random password for tests | 139 | // Do not generate a random password for test and dev environments |
139 | if (process.env.NODE_ENV === 'test') { | 140 | if (isTestOrDevInstance()) { |
140 | password = 'test' | 141 | password = 'test' |
141 | 142 | ||
142 | if (process.env.NODE_APP_INSTANCE) { | 143 | if (process.env.NODE_APP_INSTANCE) { |