Skip to content

Commit b551482

Browse files
committed
Auto merge of #18289 - darichey:fix-relative-buildfiles, r=lnicola
Fix panic when json project has relative buildfile paths The `build_file` path may be relative to the workspace root.
2 parents 0fb804a + eded3a8 commit b551482

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/project-model/src/workspace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ impl ProjectWorkspace {
553553
ProjectWorkspaceKind::Json(project) => project
554554
.crates()
555555
.filter_map(|(_, krate)| krate.build.as_ref().map(|build| build.build_file.clone()))
556-
.map(AbsPathBuf::assert)
556+
.map(|build_file| self.workspace_root().join(build_file))
557557
.collect(),
558558
_ => vec![],
559559
}

0 commit comments

Comments
 (0)