Add info logs to fix command
ci/woodpecker/push/woodpecker Pipeline was successful Details

This commit is contained in:
Elara 2022-12-02 12:45:34 -08:00
parent 9fa3977d3a
commit fcd5c1c14b
1 changed files with 6 additions and 0 deletions

6
fix.go
View File

@ -14,11 +14,15 @@ import (
func fixCmd(c *cli.Context) error {
gdb.Close()
log.Info("Removing cache directory").Send()
err := os.RemoveAll(config.CacheDir)
if err != nil {
log.Fatal("Unable to remove cache directory").Err(err).Send()
}
log.Info("Rebuilding cache").Send()
err = os.MkdirAll(config.CacheDir, 0o755)
if err != nil {
log.Fatal("Unable to create new cache directory").Err(err).Send()
@ -42,5 +46,7 @@ func fixCmd(c *cli.Context) error {
log.Fatal("Error pulling repos").Err(err).Send()
}
log.Info("Done").Send()
return nil
}