feat: add autoPull in config

This commit is contained in:
2025-01-22 18:10:57 +03:00
parent 30f95a4cbf
commit 309ecf784f
9 changed files with 115 additions and 80 deletions

View File

@ -64,10 +64,12 @@ func InstallCmd() *cli.Command {
os.Exit(1)
}
err := repos.Pull(ctx, config.Config(ctx).Repos)
if err != nil {
slog.Error(gotext.Get("Error pulling repositories"), "err", err)
os.Exit(1)
if config.GetInstance(ctx).AutoPull(ctx) {
err := repos.Pull(ctx, config.Config(ctx).Repos)
if err != nil {
slog.Error(gotext.Get("Error pulling repositories"), "err", err)
os.Exit(1)
}
}
found, notFound, err := repos.FindPkgs(ctx, args.Slice())