Add info logs to fix command
This commit is contained in:
parent
af068507f1
commit
b353261151
6
fix.go
6
fix.go
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue