Update install date on install/upgrade

This commit is contained in:
Johnny Huang 2025-08-13 20:42:13 -07:00
parent 8e8458809e
commit 94f0bab726
2 changed files with 3 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package main
import (
"fmt"
"strings"
"time"
)
// Package holds all combined information for a formula or cask.
@ -98,6 +99,7 @@ func (pkg *Package) MarkInstalled() {
pkg.IsInstalled = true
pkg.IsOutdated = false
pkg.InstalledVersion = pkg.Version
pkg.InstalledDate = time.Now().Format(time.DateOnly)
}
func (pkg *Package) MarkInstalledAsDep() {

2
ui.go
View File

@ -539,7 +539,7 @@ func (m *model) updateViewport() {
if m.isColumnEnabled(colSize) {
b.WriteString(fmt.Sprintf("Size: %s\n", pkg.FormattedSize))
}
b.WriteString(fmt.Sprintf("Installed on: %s\n", pkg.InstalledDate))
b.WriteString(fmt.Sprintf("Last installed on: %s\n", pkg.InstalledDate))
}
if len(pkg.Conflicts) > 0 {