Skip to content

Commit

Permalink
Auto merge of #18289 - darichey:fix-relative-buildfiles, r=lnicola
Browse files Browse the repository at this point in the history
Fix panic when json project has relative buildfile paths

The `build_file` path may be relative to the workspace root.
  • Loading branch information
bors committed Oct 12, 2024
2 parents ee7c8b9 + 0865296 commit 7562b17
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ impl ProjectWorkspace {
ProjectWorkspaceKind::Json(project) => project
.crates()
.filter_map(|(_, krate)| krate.build.as_ref().map(|build| build.build_file.clone()))
.map(AbsPathBuf::assert)
.map(|build_file| self.workspace_root().join(build_file))
.collect(),
_ => vec![],
}
Expand Down

0 comments on commit 7562b17

Please sign in to comment.