Improve logging and fix linter errors
This commit is contained in:
@@ -51,7 +51,7 @@ func EnsureChromeSandboxPermissions(reg *updater.ResourceRegistry) error {
|
||||
|
||||
return fmt.Errorf("failed to chmod: %w", err)
|
||||
}
|
||||
log.Infof("updates: fixed SUID permission for chrome-sandbox")
|
||||
log.Debugf("updates: fixed SUID permission for chrome-sandbox")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ func MandatoryUpdates() (identifiers []string) {
|
||||
|
||||
// Stop here if we only want intel data.
|
||||
if intelOnly.IsSet() {
|
||||
return
|
||||
return identifiers
|
||||
}
|
||||
|
||||
// Binaries
|
||||
|
||||
@@ -284,13 +284,13 @@ func checkForUpdates(ctx context.Context) (err error) {
|
||||
|
||||
if err = registry.UpdateIndexes(ctx); err != nil {
|
||||
err = fmt.Errorf("failed to update indexes: %w", err)
|
||||
return
|
||||
return //nolint:nakedret // TODO: Would "return err" work with the defer?
|
||||
}
|
||||
|
||||
err = registry.DownloadUpdates(ctx, !forcedUpdate)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("failed to download updates: %w", err)
|
||||
return
|
||||
return //nolint:nakedret // TODO: Would "return err" work with the defer?
|
||||
}
|
||||
|
||||
registry.SelectVersions()
|
||||
@@ -299,7 +299,7 @@ func checkForUpdates(ctx context.Context) (err error) {
|
||||
err = registry.UnpackResources()
|
||||
if err != nil {
|
||||
err = fmt.Errorf("failed to unpack updates: %w", err)
|
||||
return
|
||||
return //nolint:nakedret // TODO: Would "return err" work with the defer?
|
||||
}
|
||||
|
||||
// Purge old resources
|
||||
|
||||
Reference in New Issue
Block a user