fix: use config for IncludeNeeds in Deps and Repos commands
- Add IncludeNeeds() to DepsConfigProvider and ReposConfigProvider - Update depsConfig in tests - Use c.IncludeNeeds() in run.go instead of hardcoded false Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
parent
c07a82da70
commit
60214c2c78
|
|
@ -131,7 +131,7 @@ func (a *App) Deps(c DepsConfigProvider) error {
|
|||
return a.ForEachState(func(run *Run) (_ bool, errs []error) {
|
||||
errs = run.Deps(c)
|
||||
return
|
||||
}, false, c.IncludeTransitiveNeeds(), SetFilter(true))
|
||||
}, c.IncludeNeeds(), c.IncludeTransitiveNeeds(), SetFilter(true))
|
||||
}
|
||||
|
||||
func (a *App) Repos(c ReposConfigProvider) error {
|
||||
|
|
@ -143,7 +143,7 @@ func (a *App) Repos(c ReposConfigProvider) error {
|
|||
}
|
||||
|
||||
return
|
||||
}, false, c.IncludeTransitiveNeeds(), SetFilter(true))
|
||||
}, c.IncludeNeeds(), c.IncludeTransitiveNeeds(), SetFilter(true))
|
||||
}
|
||||
|
||||
func (a *App) Diff(c DiffConfigProvider) error {
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ type DepsConfigProvider interface {
|
|||
|
||||
type ReposConfigProvider interface {
|
||||
Args() string
|
||||
IncludeNeeds() bool
|
||||
IncludeTransitiveNeeds() bool
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,11 @@ func NewReposImpl(g *GlobalImpl, b *ReposOptions) *ReposImpl {
|
|||
}
|
||||
}
|
||||
|
||||
// IncludeNeeds returns the include needs
|
||||
func (r *ReposImpl) IncludeNeeds() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IncludeTransitiveNeeds returns the include transitive needs
|
||||
func (r *ReposImpl) IncludeTransitiveNeeds() bool {
|
||||
return false
|
||||
|
|
|
|||
Loading…
Reference in New Issue