ksud: fmt
This commit is contained in:
@@ -579,7 +579,12 @@ pub fn run() -> Result<()> {
|
|||||||
None => anyhow::bail!("Key '{key}' not found"),
|
None => anyhow::bail!("Key '{key}' not found"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ModuleConfigCmd::Set { key, value, stdin, temp } => {
|
ModuleConfigCmd::Set {
|
||||||
|
key,
|
||||||
|
value,
|
||||||
|
stdin,
|
||||||
|
temp,
|
||||||
|
} => {
|
||||||
// Validate key at CLI layer for better user experience
|
// Validate key at CLI layer for better user experience
|
||||||
module_config::validate_config_key(&key)?;
|
module_config::validate_config_key(&key)?;
|
||||||
|
|
||||||
@@ -590,7 +595,8 @@ pub fn run() -> Result<()> {
|
|||||||
// Read from stdin
|
// Read from stdin
|
||||||
use std::io::Read;
|
use std::io::Read;
|
||||||
let mut buffer = String::new();
|
let mut buffer = String::new();
|
||||||
std::io::stdin().read_to_string(&mut buffer)
|
std::io::stdin()
|
||||||
|
.read_to_string(&mut buffer)
|
||||||
.context("Failed to read from stdin")?;
|
.context("Failed to read from stdin")?;
|
||||||
buffer
|
buffer
|
||||||
}
|
}
|
||||||
@@ -604,7 +610,12 @@ pub fn run() -> Result<()> {
|
|||||||
} else {
|
} else {
|
||||||
module_config::ConfigType::Persist
|
module_config::ConfigType::Persist
|
||||||
};
|
};
|
||||||
module_config::set_config_value(&module_id, &key, &value_str, config_type)
|
module_config::set_config_value(
|
||||||
|
&module_id,
|
||||||
|
&key,
|
||||||
|
&value_str,
|
||||||
|
config_type,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
ModuleConfigCmd::List => {
|
ModuleConfigCmd::List => {
|
||||||
let config = module_config::merge_configs(&module_id)?;
|
let config = module_config::merge_configs(&module_id)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user