diff options
| author | Eltrac <hi@guhub.cn> | 2025-11-21 08:38:15 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-11-21 08:38:15 +0800 |
| commit | 4528958c13a5047d1e9e30d266996c93175e3731 (patch) | |
| tree | 627c8463bee98534075934c5c6f5cc3f33ae11d8 /print.go | |
| parent | c5b8d2b4ac75904dc2e47b3c019e7e5a6d9c55ff (diff) | |
fix: show recent activity only if there's a binary
Diffstat (limited to 'print.go')
| -rw-r--r-- | print.go | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -39,7 +39,8 @@ func printUserInteractionSummary(data *statistics) { data.ReverseDependencies) printed2 := printRecentActivity( data.InstalledVersion, - data.LastAccessTime) + data.LastAccessTime, + data.BinaryExists) if printed1 || printed2 { fmt.Println() } @@ -98,10 +99,12 @@ func printInstallDesc( // answers questions like "have I used this recently?" func printRecentActivity( - installedVersion string, - atime time.Time) (printed bool) { - // skip if not installed - if installedVersion == "" { + installed string, + atime time.Time, + binary bool) (printed bool) { + + // skip if not installed or no related binary + if installed == "" || !binary { return false } |
