summaryrefslogtreecommitdiff
path: root/print.go
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-11-21 08:38:15 +0800
committerEltrac <hi@guhub.cn>2025-11-21 08:38:15 +0800
commit4528958c13a5047d1e9e30d266996c93175e3731 (patch)
tree627c8463bee98534075934c5c6f5cc3f33ae11d8 /print.go
parentc5b8d2b4ac75904dc2e47b3c019e7e5a6d9c55ff (diff)
fix: show recent activity only if there's a binary
Diffstat (limited to 'print.go')
-rw-r--r--print.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/print.go b/print.go
index 44ed428..53b0f5c 100644
--- a/print.go
+++ b/print.go
@@ -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
}