mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
fix variable shadowing bug where provided RootCA would always be a nil byte slice
This commit is contained in:
parent
1904d4e1ce
commit
fbd03e5b90
@ -250,7 +250,7 @@ func (s *CMServer) Run(_ []string) error {
|
||||
var rootCA []byte
|
||||
|
||||
if s.RootCAFile != "" {
|
||||
rootCA, err := ioutil.ReadFile(s.RootCAFile)
|
||||
rootCA, err = ioutil.ReadFile(s.RootCAFile)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error reading root-ca-file at %s: %v", s.RootCAFile, err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user