Browse Source

Explicitly call InitConfigDir

feature/create-install-pkgs
Tovi Jaeschke-Rogers 3 years ago
parent
commit
d45f42fe26
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      Client/main.go

+ 8
- 3
Client/main.go View File

@ -13,16 +13,15 @@ import (
"PackageManager/Variables"
)
func init() {
func InitConfigDir() error {
var (
e error
)
_, e = os.Stat(Variables.ConfigDir)
if os.IsNotExist(e) {
os.MkdirAll(Variables.ConfigDir, 0644)
} else if e != nil {
panic(e)
}
return e
}
func HelpMsg() {
@ -90,6 +89,12 @@ func main() {
return
}
e = InitConfigDir()
if e != nil {
fmt.Println(Color.Fatal(e))
return
}
e = Database.InitDB()
if e != nil {
panic(e)


Loading…
Cancel
Save