mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
add version info and remove double config call (#977)
This commit is contained in:
parent
36973021fa
commit
4ce2edda9e
@ -49,9 +49,6 @@ func Attest(v *viper.Viper, app *config.Application, ro *options.RootOptions) *c
|
|||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
// this MUST be called first to make sure app config decodes
|
// this MUST be called first to make sure app config decodes
|
||||||
// the viper object correctly
|
// the viper object correctly
|
||||||
newLogWrapper(app)
|
|
||||||
logApplicationConfig(app)
|
|
||||||
|
|
||||||
if app.CheckForAppUpdate {
|
if app.CheckForAppUpdate {
|
||||||
checkForApplicationUpdate()
|
checkForApplicationUpdate()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -123,6 +123,8 @@ func checkForApplicationUpdate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func logApplicationConfig(app *config.Application) {
|
func logApplicationConfig(app *config.Application) {
|
||||||
|
versionInfo := version.FromBuild()
|
||||||
|
log.Infof("syft version: %+v", versionInfo.Version)
|
||||||
log.Debugf("application config:\n%+v", color.Magenta.Sprint(app.String()))
|
log.Debugf("application config:\n%+v", color.Magenta.Sprint(app.String()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user