mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 22:12:28 +01:00
* add file catalogers to selection configuration Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * fix typos Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * warn when there is conflicting file cataloging configuration Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * allow for explicit removal of all package and file tasks Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * address PR feedback Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
24 lines
458 B
Go
24 lines
458 B
Go
package commands
|
|
|
|
import (
|
|
"io"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/anchore/clio"
|
|
"github.com/anchore/syft/cmd/syft/internal/ui"
|
|
)
|
|
|
|
func disableUI(app clio.Application, out io.Writer) func(*cobra.Command, []string) error {
|
|
return func(_ *cobra.Command, _ []string) error {
|
|
type Stater interface {
|
|
State() *clio.State
|
|
}
|
|
|
|
state := app.(Stater).State()
|
|
state.UI = clio.NewUICollection(ui.None(out, state.Config.Log.Quiet))
|
|
|
|
return nil
|
|
}
|
|
}
|