saveActionCache saves the action cache after all compilations
(actionCache *workflow.ActionCache, verbose bool)
| 45 | |
| 46 | // saveActionCache saves the action cache after all compilations |
| 47 | func saveActionCache(actionCache *workflow.ActionCache, verbose bool) error { |
| 48 | if actionCache == nil { |
| 49 | return nil |
| 50 | } |
| 51 | |
| 52 | compileInfrastructureLog.Print("Saving action cache") |
| 53 | |
| 54 | if err := actionCache.Save(); err != nil { |
| 55 | compileInfrastructureLog.Printf("Failed to save action cache: %v", err) |
| 56 | if verbose { |
| 57 | fmt.Fprintln(os.Stderr, console.FormatWarningMessage(fmt.Sprintf("Failed to save action cache: %v", err))) |
| 58 | } |
| 59 | return err |
| 60 | } |
| 61 | |
| 62 | compileInfrastructureLog.Print("Action cache saved successfully") |
| 63 | if verbose { |
| 64 | fmt.Fprintln(os.Stderr, console.FormatSuccessMessage("Action cache saved to "+actionCache.GetCachePath())) |
| 65 | } |
| 66 | |
| 67 | return nil |
| 68 | } |
no test coverage detected