Skip to content

Commit

Permalink
fix(cli/deploy): use unwrap_or_else
Browse files Browse the repository at this point in the history
  • Loading branch information
xdoardo authored and theduke committed Jun 18, 2024
1 parent 1712c5d commit ac76148
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/cli/src/commands/app/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,11 @@ impl AsyncCliCommand for CmdAppDeploy {
let client =
login_user(&self.api, &self.env, !self.non_interactive, "deploy an app").await?;

let base_dir_path = self
.dir
.clone()
.unwrap_or(self.path.clone().unwrap_or(std::env::current_dir()?));
let base_dir_path = self.dir.clone().unwrap_or_else(|| {
self.path
.clone()
.unwrap_or_else(|| std::env::current_dir().unwrap())
});

let (app_config_path, base_dir_path) = {
if base_dir_path.is_file() {
Expand Down

0 comments on commit ac76148

Please sign in to comment.