From a3ac4567e39133e736e7e74365f10e9b97861621 Mon Sep 17 00:00:00 2001 From: Asher Date: Thu, 25 Apr 2019 14:08:46 -0500 Subject: [PATCH] Only output password if it was generated --- packages/server/src/cli.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/server/src/cli.ts b/packages/server/src/cli.ts index 7183d45b..26b1adea 100644 --- a/packages/server/src/cli.ts +++ b/packages/server/src/cli.ts @@ -216,6 +216,7 @@ const bold = (text: string | number): string | number => { } let password = options.password || process.env.PASSWORD; + const usingCustomPassword = !!password; if (!password) { // Generate a random password with a length of 24. const buffer = Buffer.alloc(12); @@ -304,7 +305,7 @@ const bold = (text: string | number): string | number => { logger.warn("Documentation on securing your setup: https://github.com/codercom/code-server/blob/master/doc/security/ssl.md"); } - if (!options.noAuth) { + if (!options.noAuth && !usingCustomPassword) { logger.info(" "); logger.info(`Password:\u001B[1m ${password}`); } else {