hotfix: fix init dir permission deny (#573)

This commit is contained in:
naison
2025-05-07 00:01:44 +08:00
committed by GitHub
parent 31a42c1fa7
commit 8b0e87592a
2 changed files with 2 additions and 1 deletions

View File

@@ -41,6 +41,7 @@ func CmdDaemon(cmdutil.Factory) *cobra.Command {
_ = util.CleanupTempKubeConfigFile()
} else {
go util.StartupPProf(config.PProfPort)
config.Init()
}
return initLogfile(action.GetDaemonLogPath(opt.IsSudo))
},

View File

@@ -29,7 +29,7 @@ const (
//go:embed config.yaml
var config []byte
func init() {
func Init() {
err := os.MkdirAll(DaemonPath, 0755)
if err != nil {
panic(err)