Skip to content

Commit

Permalink
fix more unwrapped %q instances in the same file
Browse files Browse the repository at this point in the history
  • Loading branch information
faec committed Oct 31, 2024
1 parent 085b30b commit f683d8e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/pkg/agent/migration/migrate_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func MigrateToEncryptedConfig(ctx context.Context, l *logp.Logger, unencryptedCo

unencStat, unencFileErr := os.Stat(unencryptedConfigPath)

l.Debugf("checking stat of enc config %q: %+v, err: %v", encryptedConfigPath, encStat, encFileErr)
l.Debugf("checking stat of unenc config %q: %+v, err: %v", unencryptedConfigPath, unencStat, unencFileErr)
l.Debugf(fmt.Sprintf("checking stat of enc config %q: %+v, err: %v", encryptedConfigPath, encStat, encFileErr.Error()))
l.Debugf(fmt.Sprintf("checking stat of unenc config %q: %+v, err: %v", unencryptedConfigPath, unencStat, unencFileErr.Error()))

isEncryptedConfigEmpty := errors.Is(encFileErr, fs.ErrNotExist) || encStat.Size() == 0
isUnencryptedConfigPresent := unencFileErr == nil && unencStat.Size() > 0
Expand All @@ -54,7 +54,7 @@ func MigrateToEncryptedConfig(ctx context.Context, l *logp.Logger, unencryptedCo
defer func() {
err = reader.Close()
if err != nil {
l.Errorf("Error closing unencrypted store reader for %q: %v", unencryptedConfigPath, err)
l.Errorf(fmt.Sprintf("Error closing unencrypted store reader for %q: %v", unencryptedConfigPath, err.Error()))
}
}()
store, err := storage.NewEncryptedDiskStore(ctx, encryptedConfigPath, storageOpts...)
Expand Down

0 comments on commit f683d8e

Please sign in to comment.