Skip to content

Commit cf90d0d

Browse files
zthCopilot
andauthored
Update rewatch/src/build/compile/dependency_cycle.rs
Co-authored-by: Copilot <[email protected]>
1 parent 41317cb commit cf90d0d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rewatch/src/build/compile/dependency_cycle.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ pub fn format(cycle: &[String], build_state: &BuildCommandState) -> String {
151151
nodes.reverse();
152152
nodes.push(nodes[0].clone());
153153

154-
let root = build_state.get_root_config().path.parent().unwrap();
154+
let root_path = &build_state.get_root_config().path;
155+
let root = root_path.parent().unwrap_or(root_path.as_path());
155156

156157
nodes
157158
.iter()

0 commit comments

Comments
 (0)