@@ -28,7 +28,7 @@ commander.version(process.env.VERSION || "development")
2828 . option ( "-p, --port <number>" , "Port to bind on." , parseInt ( process . env . PORT ! , 10 ) || 8443 )
2929 . option ( "-N, --no-auth" , "Start without requiring authentication." , undefined )
3030 . 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." )
3232 . option ( "--disable-telemetry" , "Disables ALL telemetry." , false )
3333 . option ( "--install-extension <value>" , "Install an extension by its ID." )
3434 . option ( "--bootstrap-fork <name>" , "Used for development. Never set." )
@@ -209,7 +209,11 @@ const bold = (text: string | number): string | number => {
209209 }
210210 } ) ;
211211
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 ;
213217 if ( ! password ) {
214218 // Generate a random password with a length of 24.
215219 const buffer = Buffer . alloc ( 12 ) ;
0 commit comments