mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Clarify ancestor usage in workspace detection
This commit is contained in:
@@ -166,6 +166,8 @@ pub fn chdir_workspace_root() -> Result<()> {
|
|||||||
let workspace_root = project_dir
|
let workspace_root = project_dir
|
||||||
.ancestors()
|
.ancestors()
|
||||||
.filter(|dir| dir.join("Cargo.toml").exists())
|
.filter(|dir| dir.join("Cargo.toml").exists())
|
||||||
|
// The ancestors are ordered starting from `project_dir` going up to the filesystem root. So
|
||||||
|
// this is the leftmost matching ancestor.
|
||||||
.last()
|
.last()
|
||||||
.with_context(|| {
|
.with_context(|| {
|
||||||
format!(
|
format!(
|
||||||
|
|||||||
Reference in New Issue
Block a user