mirror of
https://github.com/aaif-goose/goose.git
synced 2026-07-03 14:10:03 +02:00
fix: handle keyring fallback as success (#7177)
Signed-off-by: sheikhlimon <sheikhlimon404@gmail.com>
This commit is contained in:
@@ -802,11 +802,15 @@ impl Config {
|
||||
match &self.secrets {
|
||||
SecretStorage::Keyring { service } => {
|
||||
let json_value = serde_json::to_string(&values)?;
|
||||
self.handle_keyring_operation(
|
||||
match self.handle_keyring_operation(
|
||||
|entry| entry.set_password(&json_value),
|
||||
service,
|
||||
Some(&values),
|
||||
)?;
|
||||
) {
|
||||
Ok(_) => {}
|
||||
Err(ConfigError::FallbackToFileStorage) => {}
|
||||
Err(e) => return Err(e),
|
||||
}
|
||||
}
|
||||
SecretStorage::File { path } => {
|
||||
let yaml_value = serde_yaml::to_string(&values)?;
|
||||
@@ -839,11 +843,15 @@ impl Config {
|
||||
match &self.secrets {
|
||||
SecretStorage::Keyring { service } => {
|
||||
let json_value = serde_json::to_string(&values)?;
|
||||
self.handle_keyring_operation(
|
||||
match self.handle_keyring_operation(
|
||||
|entry| entry.set_password(&json_value),
|
||||
service,
|
||||
Some(&values),
|
||||
)?;
|
||||
) {
|
||||
Ok(_) => {}
|
||||
Err(ConfigError::FallbackToFileStorage) => {}
|
||||
Err(e) => return Err(e),
|
||||
}
|
||||
}
|
||||
SecretStorage::File { path } => {
|
||||
let yaml_value = serde_yaml::to_string(&values)?;
|
||||
|
||||
Reference in New Issue
Block a user