Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mchf committed Nov 15, 2023
1 parent 0312be3 commit 861234a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions rust/agama-cli/src/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ pub enum LogsCommands {
/// Main entry point called from agama CLI main loop
pub async fn run(subcommand: LogsCommands) -> anyhow::Result<()> {
match subcommand {
LogsCommands::Store { verbose, destination } => {
LogsCommands::Store {
verbose,
destination
} => {
// feed internal options structure by what was received from user
// for now we always use / add defaults if any
let destination = parse_destination(destination)?;
Expand Down Expand Up @@ -77,11 +80,11 @@ fn parse_destination(destination: Option<PathBuf>) -> Result<PathBuf, io::Error>
} else if path.parent().is_some() {
// validate if parent directory realy exists
if !path.parent().unwrap().is_dir() {
return Err(err)
return Err(err);
}
// whatever else -> input error
} else {
return Err(err)
return Err(err);
}

Ok(buffer)
Expand Down

0 comments on commit 861234a

Please sign in to comment.