Skip to content

Commit

Permalink
fixup! Config: Version Management
Browse files Browse the repository at this point in the history
  • Loading branch information
gbjk committed Oct 12, 2024
1 parent b6b101d commit a70c38a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1498,6 +1498,8 @@ func (c *Config) ReadConfigFromFile(path string, dryrun bool) error {
return c.saveWithEncryptPrompt(path)
}

type keyProvider func() ([]byte, error)

// readConfig loads config from a io.Reader into the config object
// versions manager will upgrade/downgrade if appropriate
// If encrypted, prompts for encryption key
Expand Down Expand Up @@ -1535,8 +1537,6 @@ func (c *Config) saveWithEncryptPrompt(path string) error {
return c.SaveConfigToFile(path)
}

type keyProvider func() ([]byte, error)

// decryptConfig reads encrypted configuration and requests key from provider
func (c *Config) decryptConfig(j []byte, keyProvider keyProvider) ([]byte, error) {
for range maxAuthFailures {
Expand Down

0 comments on commit a70c38a

Please sign in to comment.