Skip to content

Commit

Permalink
Better logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ofalvai committed Nov 21, 2023
1 parent 7221c75 commit 42709ad
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cli/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ func runBuildEndHooks(hooks configs.AgentHooks) error {
}

func cleanupDirs(dirs []string) error {
if len(dirs) == 0 {
return nil
}

log.Print()
log.Infof("Run cleanups before build")
log.Print()
for _, dir := range dirs {
expandedPath := os.ExpandEnv(dir)
Expand All @@ -118,7 +124,7 @@ func cleanupDirs(dirs []string) error {
if err := os.RemoveAll(absPath); err != nil {
return fmt.Errorf("cleaning up %s: %w", dir, err)
}
log.Donef("Cleaned %s", colorstring.Cyan(expandedPath))
log.Donef("- Cleaned %s", colorstring.Cyan(expandedPath))
}

return nil
Expand Down

0 comments on commit 42709ad

Please sign in to comment.