summaryrefslogtreecommitdiffstats
path: root/gui/src/main.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-12-08 18:32:13 +0100
committerMatthias Beyer <mail@beyermatthias.de>2021-12-08 18:44:24 +0100
commit8b019270a0fb90e801ca6d44cbb32e8340e371ea (patch)
treee0dd27fdfaa811733b536d1720bf6200b14f9f09 /gui/src/main.rs
parentcbdcf2228513e3f8ef87028bbabb802558039f30 (diff)
Add passing of profile name to GUI bootup code
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'gui/src/main.rs')
-rw-r--r--gui/src/main.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/gui/src/main.rs b/gui/src/main.rs
index ea47a93..bfa133e 100644
--- a/gui/src/main.rs
+++ b/gui/src/main.rs
@@ -10,16 +10,14 @@ fn main() -> Result<()> {
let matches = crate::cli::app().get_matches();
match matches.subcommand() {
- None => crate::gui::run(),
+ None => {
+ let name = matches.value_of("name").map(String::from).unwrap(); // safe by clap
+ crate::gui::run(name)
+ },
Some((other, _)) => {
log::error!("No subcommand {} implemented", other);
Ok(())
},
-
- _ => {
- log::error!("Don't know what to do");
- Ok(())
- },
}
}