Skip to content

Commit 4e88328

Browse files
committed
printing path error
1 parent 1bf9386 commit 4e88328

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/ownership.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use self::{
3333
pub struct Ownership {
3434
project: Arc<Project>,
3535
}
36-
36+
#[derive(Debug)]
3737
pub struct FileOwner {
3838
pub team: Team,
3939
pub team_config_file_path: String,

src/ownership/for_file_fast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ fn load_teams(project_root: &Path, team_file_globs: &[String]) -> std::result::R
123123
match Team::from_team_file_path(path.clone()) {
124124
Ok(team) => teams.push(team),
125125
Err(e) => {
126-
eprintln!("Error parsing team file: {}", e);
126+
eprintln!("Error parsing team file: {}, path: {}", e, path.display());
127127
continue;
128128
}
129129
}

src/project.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,7 @@ impl Project {
178178
}
179179

180180
pub fn relative_path<'a>(&'a self, absolute_path: &'a Path) -> &'a Path {
181-
absolute_path
182-
.strip_prefix(&self.base_path)
183-
.expect("Could not generate relative path")
181+
absolute_path.strip_prefix(&self.base_path).unwrap_or(absolute_path)
184182
}
185183

186184
pub fn get_team(&self, name: &str) -> Option<Team> {

0 commit comments

Comments
 (0)