Skip to content

Commit

Permalink
fix: init config failed
Browse files Browse the repository at this point in the history
  • Loading branch information
thlz998 committed Feb 24, 2022
1 parent c933ade commit 70b73b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ func makeFile(name string, source string) {
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)
if err != nil {
fmt.Println(color.RedString(L("Fatal: %s"), err.Error()))
Expand Down

0 comments on commit 70b73b2

Please sign in to comment.