aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorFlorent <florent.git@zeteo.me>2022-07-26 09:31:26 +0200
committerChocobozzz <chocobozzz@cpy.re>2022-07-26 10:00:17 +0200
commit3efa4da1fef44400931c3db47dc27a92da77062e (patch)
tree40310f32e735ff4da6972b9111b29829009ffa9e /server
parent9e2a4af3a0d21f93ebc042e0be3666fed947f894 (diff)
downloadPeerTube-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.ts5
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
10import { CONFIG } from './config' 10import { CONFIG } from './config'
11import { FILES_CACHE, HLS_STREAMING_PLAYLIST_DIRECTORY, LAST_MIGRATION_VERSION, RESUMABLE_UPLOAD_DIRECTORY } from './constants' 11import { FILES_CACHE, HLS_STREAMING_PLAYLIST_DIRECTORY, LAST_MIGRATION_VERSION, RESUMABLE_UPLOAD_DIRECTORY } from './constants'
12import { sequelizeTypescript } from './database' 12import { sequelizeTypescript } from './database'
13import { isTestOrDevInstance } from '@server/helpers/core-utils'
13 14
14async function installApplication () { 15async 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) {