feat: cli arg for file permission of socket (#4923)

This commit is contained in:
Ciel
2022-03-04 00:54:35 +08:00
committed by GitHub
parent 78658f1cf4
commit c4d87580ef
4 changed files with 34 additions and 4 deletions

View File

@@ -56,6 +56,7 @@ export interface UserProvidedArgs {
open?: boolean
"bind-addr"?: string
socket?: string
"socket-mode"?: string
version?: boolean
"proxy-domain"?: string[]
"reuse-window"?: boolean
@@ -175,6 +176,7 @@ const options: Options<Required<UserProvidedArgs>> = {
port: { type: "number", description: "" },
socket: { type: "string", path: true, description: "Path to a socket (bind-addr will be ignored)." },
"socket-mode": { type: "string", description: "File mode of the socket." },
version: { type: "boolean", short: "v", description: "Display version information." },
_: { type: "string[]" },
@@ -513,6 +515,7 @@ export async function setDefaults(cliArgs: UserProvidedArgs, configArgs?: Config
args.host = "localhost"
args.port = 0
args.socket = undefined
args["socket-mode"] = undefined
args.cert = undefined
args.auth = AuthType.None
}