Only output password if it was generated
This commit is contained in:
parent
58cf109a83
commit
a3ac4567e3
@ -216,6 +216,7 @@ const bold = (text: string | number): string | number => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let password = options.password || process.env.PASSWORD;
|
let password = options.password || process.env.PASSWORD;
|
||||||
|
const usingCustomPassword = !!password;
|
||||||
if (!password) {
|
if (!password) {
|
||||||
// Generate a random password with a length of 24.
|
// Generate a random password with a length of 24.
|
||||||
const buffer = Buffer.alloc(12);
|
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");
|
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(" ");
|
||||||
logger.info(`Password:\u001B[1m ${password}`);
|
logger.info(`Password:\u001B[1m ${password}`);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user