mirror of https://github.com/coder/code-server.git
Format redacted arg lines
Pushing straight to main again.
This commit is contained in:
parent
3f7db15fde
commit
5708e6ce32
|
@ -433,10 +433,7 @@ export const parse = (
|
||||||
throw new Error("--cert-key is missing")
|
throw new Error("--cert-key is missing")
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.debug(() => [
|
logger.debug(() => [`parsed ${opts?.configFile ? "config" : "command line"}`, field("args", redactArgs(args))])
|
||||||
`parsed ${opts?.configFile ? "config" : "command line"}`,
|
|
||||||
field("args", redactArgs(args)),
|
|
||||||
])
|
|
||||||
|
|
||||||
return args
|
return args
|
||||||
}
|
}
|
||||||
|
@ -446,11 +443,11 @@ export const parse = (
|
||||||
*/
|
*/
|
||||||
export const redactArgs = (args: UserProvidedArgs): UserProvidedArgs => {
|
export const redactArgs = (args: UserProvidedArgs): UserProvidedArgs => {
|
||||||
return {
|
return {
|
||||||
...args,
|
...args,
|
||||||
password: args.password ? "<redacted>" : undefined,
|
password: args.password ? "<redacted>" : undefined,
|
||||||
"hashed-password": args["hashed-password"] ? "<redacted>" : undefined,
|
"hashed-password": args["hashed-password"] ? "<redacted>" : undefined,
|
||||||
"github-auth": args["github-auth"] ? "<redacted>" : undefined,
|
"github-auth": args["github-auth"] ? "<redacted>" : undefined,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -182,10 +182,13 @@ export class ChildProcess extends Process {
|
||||||
},
|
},
|
||||||
this.logger,
|
this.logger,
|
||||||
)
|
)
|
||||||
this.logger.debug("got message", field("message", {
|
this.logger.debug(
|
||||||
type: message.type,
|
"got message",
|
||||||
args: redactArgs(message.args),
|
field("message", {
|
||||||
}))
|
type: message.type,
|
||||||
|
args: redactArgs(message.args),
|
||||||
|
}),
|
||||||
|
)
|
||||||
return message.args
|
return message.args
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue