feat(cli): add history command and logging for actions
This commit is contained in:
parent
f8abf29594
commit
8ed3b0c013
9 changed files with 110 additions and 4 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue