@@ -28,7 +28,7 @@ commander.version(process.env.VERSION || "development")
28
28
. option ( "-p, --port <number>" , "Port to bind on." , parseInt ( process . env . PORT ! , 10 ) || 8443 )
29
29
. option ( "-N, --no-auth" , "Start without requiring authentication." , undefined )
30
30
. option ( "-H, --allow-http" , "Allow http connections." , false )
31
- . option ( "-P, --password <value>" , "Specify a password for authentication." )
31
+ . option ( "-P, --password <value>" , "DEPRECATED: Use the PASSWORD environment variable instead. Specify a password for authentication." )
32
32
. option ( "--disable-telemetry" , "Disables ALL telemetry." , false )
33
33
. option ( "--install-extension <value>" , "Install an extension by its ID." )
34
34
. option ( "--bootstrap-fork <name>" , "Used for development. Never set." )
@@ -209,7 +209,11 @@ const bold = (text: string | number): string | number => {
209
209
}
210
210
} ) ;
211
211
212
- let password = options . password ;
212
+ if ( options . password ) {
213
+ logger . warn ( '"--password" is deprecated. Use the PASSWORD environment variable instead.' ) ;
214
+ }
215
+
216
+ let password = options . password || process . env . PASSWORD ;
213
217
if ( ! password ) {
214
218
// Generate a random password with a length of 24.
215
219
const buffer = Buffer . alloc ( 12 ) ;
0 commit comments