Only allow insecure if configured
This commit is contained in:
parent
70a647097e
commit
5c4064f87a
|
@ -45,9 +45,11 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func configureCmdRun(cmd *cobra.Command, args []string) {
|
func configureCmdRun(cmd *cobra.Command, args []string) {
|
||||||
|
if configureArgs.AllowInsecure {
|
||||||
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{
|
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{
|
||||||
InsecureSkipVerify: true,
|
InsecureSkipVerify: true,
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if _, err := os.Stat("config.yml"); err == nil && !configureArgs.Override {
|
if _, err := os.Stat("config.yml"); err == nil && !configureArgs.Override {
|
||||||
survey.AskOne(&survey.Confirm{Message: "Override existing configuration file"}, &configureArgs.Override)
|
survey.AskOne(&survey.Confirm{Message: "Override existing configuration file"}, &configureArgs.Override)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user