Skip to content

Commit

Permalink
improved error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysVuika committed Nov 21, 2024
1 parent bb28db9 commit 2e57340
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ async fn main() -> Result<()> {

let cli = Cli::parse();

let starting_dir = cli
.repo
.unwrap_or_else(|| std::env::current_dir().expect("Failed to get the repository path"));
let workspace_root = find_git_root(&starting_dir).expect("Failed to find the git repository");
let starting_dir = cli.repo.unwrap_or_else(|| {
std::env::current_dir().expect("The command should be run in a git repository")
});
let workspace_root =
find_git_root(&starting_dir).expect("The command should be run in a git repository");

debug!("Using repository: {:?}", &workspace_root);

Expand Down

0 comments on commit 2e57340

Please sign in to comment.