mirror of
https://github.com/hzqtc/taproom.git
synced 2026-01-09 05:40:50 +08:00
Update install date on install/upgrade
This commit is contained in:
parent
8e8458809e
commit
94f0bab726
@ -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
2
ui.go
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user