latest from ai, it broke the tests
This commit is contained in:
@@ -136,9 +136,9 @@ func (k *KeychainUnlocker) GetID() string {
|
||||
// Generate ID using keychain item name
|
||||
keychainItemName, err := k.GetKeychainItemName()
|
||||
if err != nil {
|
||||
// Fallback to creation time-based ID if we can't read the keychain item name
|
||||
createdAt := k.Metadata.CreatedAt
|
||||
return fmt.Sprintf("%s-keychain", createdAt.Format("2006-01-02.15.04"))
|
||||
// The vault metadata is corrupt - this is a fatal error
|
||||
// We cannot continue with a fallback ID as that would mask data corruption
|
||||
panic(fmt.Sprintf("Keychain unlocker metadata is corrupt or missing keychain item name: %v", err))
|
||||
}
|
||||
return fmt.Sprintf("%s-keychain", keychainItemName)
|
||||
}
|
||||
|
||||
@@ -111,9 +111,9 @@ func (p *PGPUnlocker) GetID() string {
|
||||
// Generate ID using GPG key ID: <keyid>-pgp
|
||||
gpgKeyID, err := p.GetGPGKeyID()
|
||||
if err != nil {
|
||||
// Fallback to creation time-based ID if we can't read the GPG key ID
|
||||
createdAt := p.Metadata.CreatedAt
|
||||
return fmt.Sprintf("%s-pgp", createdAt.Format("2006-01-02.15.04"))
|
||||
// The vault metadata is corrupt - this is a fatal error
|
||||
// We cannot continue with a fallback ID as that would mask data corruption
|
||||
panic(fmt.Sprintf("PGP unlocker metadata is corrupt or missing GPG key ID: %v", err))
|
||||
}
|
||||
return fmt.Sprintf("%s-pgp", gpgKeyID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user