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