Massive UX rewrite

- Ditch multiple libraries for progressbar, spinner, colors and replace
  with pterm
- Detect when running on terminal and disable automatically spinner
- Add support for multiple progress bars
- Huge rewrite of the configuration part. No more crazy stuff with viper
  CLI commands now correctly overrides default config file as expected
- Limit banner to be displayed on relevant parts

Fixes #211
Fixes #105
Fixes #247
Fixes #233
This commit is contained in:
Ettore Di Giacinto
2021-10-19 22:26:23 +02:00
parent d4edaa9de8
commit fe14d56afe
45 changed files with 730 additions and 463 deletions

View File

@@ -22,6 +22,7 @@ import (
. "github.com/mudler/luet/pkg/logger"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
var reclaimCmd = &cobra.Command{
@@ -29,7 +30,7 @@ var reclaimCmd = &cobra.Command{
Short: "Reclaim packages to Luet database from available repositories",
PreRun: func(cmd *cobra.Command, args []string) {
util.BindSystemFlags(cmd)
LuetCfg.Viper.BindPFlag("force", cmd.Flags().Lookup("force"))
viper.BindPFlag("force", cmd.Flags().Lookup("force"))
},
Long: `Reclaim tries to find association between packages in the online repositories and the system one.
@@ -40,7 +41,7 @@ It scans the target file system, and if finds a match with a package available i
Run: func(cmd *cobra.Command, args []string) {
util.SetSystemConfig()
force := LuetCfg.Viper.GetBool("force")
force := viper.GetBool("force")
Debug("Solver", LuetCfg.GetSolverOptions().CompactString())