realising, that an extra msg_thread will be nececary
This commit is contained in:
@@ -5,6 +5,7 @@ use home::home_dir;
|
||||
|
||||
use mize::error::{IntoMizeResult, MizeError, MizeResult, MizeResultTrait};
|
||||
use mize::instance::Instance;
|
||||
use mize::item::IntoItemData;
|
||||
use mize::platform::os::config_from_cli_args;
|
||||
|
||||
|
||||
@@ -16,19 +17,12 @@ pub fn set(sub_matches: &ArgMatches) -> MizeResult<()> {
|
||||
let id = sub_matches.get_one::<String>("id")
|
||||
.ok_or(MizeError::new().msg("No id Argument specified"))?;
|
||||
|
||||
let item = instance.get(id)?;
|
||||
let value = sub_matches.get_one::<String>("value")
|
||||
.ok_or(MizeError::new().msg("No value Argument specified"))?;
|
||||
|
||||
let recurse_count = sub_matches.get_count("recurse");
|
||||
instance.set(id, value.into_item_data())?;
|
||||
|
||||
println!("{}", item.as_data_full()?);
|
||||
return Ok(());
|
||||
instance.wait_for_updaater_thread()?;
|
||||
|
||||
if recurse_count > 0 {
|
||||
println!("{}", item.id());
|
||||
println!("{}", item.as_data_full()?);
|
||||
} else {
|
||||
println!("{}", item);
|
||||
};
|
||||
|
||||
return Ok(());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user