feat: add autoPull in config
This commit is contained in:
@ -45,6 +45,7 @@ var defaultConfig = &types.Config{
|
||||
RootCmd: "sudo",
|
||||
PagerStyle: "native",
|
||||
IgnorePkgUpdates: []string{},
|
||||
AutoPull: true,
|
||||
Repos: []types.Repo{
|
||||
{
|
||||
Name: "default",
|
||||
@ -162,3 +163,10 @@ func (c *ALRConfig) IgnorePkgUpdates(ctx context.Context) []string {
|
||||
})
|
||||
return c.cfg.IgnorePkgUpdates
|
||||
}
|
||||
|
||||
func (c *ALRConfig) AutoPull(ctx context.Context) bool {
|
||||
c.cfgOnce.Do(func() {
|
||||
c.Load(ctx)
|
||||
})
|
||||
return c.cfg.AutoPull
|
||||
}
|
||||
|
Reference in New Issue
Block a user