mirror of https://github.com/Hilbis/Hilbish
fix: only create rc file if it doesn't exist (#10)
parent
eeafd1e5cf
commit
e4218a135a
14
main.go
14
main.go
|
@ -59,12 +59,14 @@ func main() {
|
|||
}
|
||||
|
||||
homedir, _ := os.UserHomeDir()
|
||||
err = os.WriteFile(homedir + "/.hilbishrc.lua", input, 0644)
|
||||
if err != nil {
|
||||
fmt.Println("Error creating config file")
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
if _, err := os.Stat(homedir + "/.hilbishrc.lua"); os.IsNotExist(err) {
|
||||
err = os.WriteFile(homedir + "/.hilbishrc.lua", input, 0644)
|
||||
if err != nil {
|
||||
fmt.Println("Error creating config file")
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
HandleSignals()
|
||||
LuaInit()
|
||||
|
|
Loading…
Reference in New Issue