Skip to content

Commit

Permalink
fix: create certguard directory if it not exists (#117)
Browse files Browse the repository at this point in the history
Issue: #116
  • Loading branch information
pimg authored Sep 25, 2024
1 parent fea1567 commit adb31d8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ func runInteractiveCertGuard(cmd *cobra.Command, args []string) error {
return err
}

if _, err := os.Stat(cacheDir); os.IsNotExist(err) {
err := os.MkdirAll(cacheDir, 0o775)
if err != nil {
fmt.Println("fatal:", err)
os.Exit(1)
}
}

dbConnection, err := db.NewDBConnection(cacheDir)
if err != nil {
return err
Expand Down

0 comments on commit adb31d8

Please sign in to comment.