(path string)
| 233 | } |
| 234 | |
| 235 | func removeFileIfExists(path string) (bool, error) { |
| 236 | trimmed := strings.TrimSpace(path) |
| 237 | if trimmed == "" { |
| 238 | return false, nil |
| 239 | } |
| 240 | err := os.Remove(trimmed) |
| 241 | switch { |
| 242 | case err == nil: |
| 243 | return true, nil |
| 244 | case errors.Is(err, os.ErrNotExist): |
| 245 | return false, nil |
| 246 | default: |
| 247 | return false, fmt.Errorf("cli: remove runtime artifact %q: %w", trimmed, err) |
| 248 | } |
| 249 | } |
| 250 | |
| 251 | func lifecycleBundle(title string, record lifecycleRecord) outputBundle { |
| 252 | rows := []keyValue{ |
no test coverage detected