@@ -8,17 +8,17 @@ import (
88
99 "github.com/docker/cli/cli-plugins/manager"
1010 "github.com/docker/cli/cli-plugins/plugin"
11+ "github.com/docker/sbom-cli-plugin/internal"
12+ "github.com/docker/sbom-cli-plugin/internal/bus"
13+ "github.com/docker/sbom-cli-plugin/internal/config"
14+ "github.com/docker/sbom-cli-plugin/internal/log"
15+ "github.com/docker/sbom-cli-plugin/internal/logger"
16+ "github.com/docker/sbom-cli-plugin/internal/version"
1117 "github.com/gookit/color"
1218 "github.com/spf13/cobra"
1319 "github.com/spf13/viper"
1420 "github.com/wagoodman/go-partybus"
1521
16- "github.com/anchore/docker-sbom-cli-plugin/internal"
17- "github.com/anchore/docker-sbom-cli-plugin/internal/bus"
18- "github.com/anchore/docker-sbom-cli-plugin/internal/config"
19- "github.com/anchore/docker-sbom-cli-plugin/internal/log"
20- "github.com/anchore/docker-sbom-cli-plugin/internal/logger"
21- "github.com/anchore/docker-sbom-cli-plugin/internal/version"
2222 "github.com/anchore/stereoscope"
2323 "github.com/anchore/syft/syft"
2424)
@@ -43,15 +43,17 @@ func Execute() {
4343 plugin .Run (
4444 cmd ,
4545 manager.Metadata {
46- SchemaVersion : internal .SchemaVersion ,
47- Vendor : "Anchore Inc." ,
48- Version : version .FromBuild ().Version ,
46+ SchemaVersion : internal .SchemaVersion ,
47+ Vendor : "Anchore Inc." ,
48+ Version : version .FromBuild ().Version ,
49+ ShortDescription : shortDescription ,
50+ URL : "https://github.com/docker/sbom-cli-plugin" ,
4951 },
5052 )
5153}
5254
5355func initAppConfig () {
54- cfg , err := config .LoadApplicationConfig (viper .GetViper (), cliOnlyOpts )
56+ cfg , err := config .LoadApplicationConfig (viper .GetViper ())
5557 if err != nil {
5658 fmt .Printf ("failed to load application config: \n \t %+v\n " , err )
5759 os .Exit (1 )
@@ -62,7 +64,7 @@ func initAppConfig() {
6264
6365func initLogging () {
6466 cfg := logger.LogrusConfig {
65- EnableConsole : (appConfig .Log .FileLocation == "" || appConfig .CliOptions . Verbosity > 0 ) && ! appConfig .Quiet ,
67+ EnableConsole : (appConfig .Log .FileLocation == "" || appConfig .Debug ) && ! appConfig .Quiet ,
6668 EnableFile : appConfig .Log .FileLocation != "" ,
6769 Level : appConfig .Log .LevelOpt ,
6870 Structured : appConfig .Log .Structured ,
0 commit comments