fix: init config failed
This commit is contained in:
parent
c933ade76e
commit
70b73b2974
1 changed files with 2 additions and 1 deletions
|
|
@ -301,7 +301,8 @@ func makeFile(name string, source string) {
|
||||||
makeFileContent(name, []byte(source))
|
makeFileContent(name, []byte(source))
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeFileContent(filename string, content []byte) {
|
func makeFileContent(name string, content []byte) {
|
||||||
|
filename := filepath.Join(config.Conf.Root, name)
|
||||||
err := os.WriteFile(filename, content, 0644)
|
err := os.WriteFile(filename, content, 0644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(color.RedString(L("Fatal: %s"), err.Error()))
|
fmt.Println(color.RedString(L("Fatal: %s"), err.Error()))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue