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()
|
homedir, _ := os.UserHomeDir()
|
||||||
err = os.WriteFile(homedir + "/.hilbishrc.lua", input, 0644)
|
if _, err := os.Stat(homedir + "/.hilbishrc.lua"); os.IsNotExist(err) {
|
||||||
if err != nil {
|
err = os.WriteFile(homedir + "/.hilbishrc.lua", input, 0644)
|
||||||
fmt.Println("Error creating config file")
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println("Error creating config file")
|
||||||
return
|
fmt.Println(err)
|
||||||
}
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
HandleSignals()
|
HandleSignals()
|
||||||
LuaInit()
|
LuaInit()
|
||||||
|
|
Loading…
Reference in New Issue