feat(cli): add history command and logging for actions

This commit is contained in:
Patryk Hegenberg 2025-01-24 09:24:59 +01:00
parent f8abf29594
commit 8ed3b0c013
9 changed files with 110 additions and 4 deletions

View file

@ -8,6 +8,7 @@ import (
"sync"
pm "system_setup_tool/packagemanager"
"system_setup_tool/utils"
"github.com/spf13/cobra"
)
@ -108,5 +109,8 @@ func searchConcurrently(managers []pm.PackageManager, packageName string) {
fmt.Printf("Results from %s:\n", result.manager.Name())
displayResults(result.results, result.manager.Name())
fmt.Println()
if err := utils.LogToHistory("searched", packageName, result.manager.Name()); err != nil {
fmt.Println("error logging action:", err)
}
}
}