Skip to content

Commit b8f1ca7

Browse files
committed
Only output password if it was generated
1 parent ebdbb67 commit b8f1ca7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/server/src/cli.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ const bold = (text: string | number): string | number => {
216216
}
217217

218218
let password = options.password || process.env.PASSWORD;
219+
const usingCustomPassword = !!password;
219220
if (!password) {
220221
// Generate a random password with a length of 24.
221222
const buffer = Buffer.alloc(12);
@@ -304,7 +305,7 @@ const bold = (text: string | number): string | number => {
304305
logger.warn("Documentation on securing your setup: https://github.com/codercom/code-server/blob/master/doc/security/ssl.md");
305306
}
306307

307-
if (!options.noAuth) {
308+
if (!options.noAuth && !usingCustomPassword) {
308309
logger.info(" ");
309310
logger.info(`Password:\u001B[1m ${password}`);
310311
} else {

0 commit comments

Comments
 (0)