8000 Merge pull request #268 from tucksaun/refacto/SSLKEYLOGFILE-env-var · symfony-cli/symfony-cli@d035d43 · GitHub
[go: up one dir, main page]

Skip to content

Commit d035d43

Browse files
authored
Merge pull request #268 from tucksaun/refacto/SSLKEYLOGFILE-env-var
Refacto: Make the console handles SSLKEYLOGFILE env variable precedences
2 parents 0604752 + 1984371 commit d035d43

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

commands/local_server_start.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ var localServerStartCmd = &console.Command{
7272
&console.StringFlag{
7373
Name: "tls-key-log-file",
7474
Usage: "Destination for TLS master secrets in NSS key log format",
75+
// If 'SSLKEYLOGFILE' environment variable is set, uses this as a
76+
// destination of TLS key log. In this context, the name
77+
// 'SSLKEYLOGFILE' is common, so using 'SSL' instead of 'TLS' name.
78+
// This environment variable is preferred than the key log file
79+
// from the console argument.
80+
EnvVars: []string{"SSLKEYLOGFILE"},
7581
},
7682
},
7783
Action: func(c *console.Context) error {
@@ -174,13 +180,6 @@ var localServerStartCmd = &console.Command{
174180
}
175181
}
176182

177-
// If 'SSLKEYLOGFILE' environment variable is set, uses this as a destination of TLS key log.
178-
// In this context, the name 'SSLKEYLOGFILE' is common, so using 'SSL' instead of 'TLS' name.
179-
// This environment variable is preferred than the key log file from the console argument.
180-
if path := os.Getenv("SSLKEYLOGFILE"); path != "" {
181-
config.TlsKeyLogFile = path
182-
}
183-
184183
if config.TlsKeyLogFile != "" {
185184
ui.Warning(localWebServerTlsKeyLogWarningMsg)
186185
}

0 commit comments

Comments
 (0)
0