Skip to content

Commit

Permalink
Merge b4735b7 into 55060f9
Browse files Browse the repository at this point in the history
  • Loading branch information
mediuminvader committed Jan 18, 2023
2 parents 55060f9 + b4735b7 commit 5945866
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions dozer-orchestrator/src/cli/repl/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,26 +63,26 @@ fn execute(
running: Arc<AtomicBool>,
) -> Result<bool, OrchestrationError> {
let cmd_map = get_commands();
let (_, dozer_cmd) = cmd_map
.iter()
.find(|(s, _)| s.to_string() == *cmd)
.map_or(Err(CliError::UnknownCommand(cmd.to_string())), Ok)?;

match dozer_cmd {
DozerCmd::Help => {
print_help();
Ok(true)
}
DozerCmd::ShowSources => {
list_sources(config_path)?;
Ok(true)
}
DozerCmd::Sql => {
super::sql::editor(config_path, running)?;
Ok(true)
if let Some((_, dozer_cmd)) = cmd_map.iter().find(|(s, _)| s.to_string() == *cmd) {
match dozer_cmd {
DozerCmd::Help => {
print_help();
Ok(true)
}
DozerCmd::ShowSources => {
list_sources(config_path)?;
Ok(true)
}
DozerCmd::Sql => {
super::sql::editor(config_path, running)?;
Ok(true)
}
DozerCmd::Exit => Ok(false),
DozerCmd::TestConnections => todo!(),
}
DozerCmd::Exit => Ok(false),
DozerCmd::TestConnections => todo!(),
} else {
error!("Unknown command: {}", cmd);
Ok(true)
}
}

Expand Down

0 comments on commit 5945866

Please sign in to comment.