From bf5d191c09e3544d41dcd46318c070c74ce91a12 Mon Sep 17 00:00:00 2001 From: Toby Vincent Date: Mon, 8 May 2023 16:49:51 -0500 Subject: fix: replace exclude-attached with exclude-cwd --- src/project.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/project.rs') diff --git a/src/project.rs b/src/project.rs index a35c17e..7d9357b 100644 --- a/src/project.rs +++ b/src/project.rs @@ -110,7 +110,7 @@ impl Extend for Projects { } impl From for Projects { - fn from(value: crate::config::Projects) -> Self { + fn from(mut value: crate::config::Projects) -> Self { let mut filters: Vec> = Vec::new(); if let Some(pattern) = &value.pattern { @@ -126,6 +126,12 @@ impl From for Projects { filters.push(Box::new(crate::git::Git)); } + if value.exclude_cwd { + if let Ok(path) = std::env::current_dir() { + value.excludes.push(path) + } + } + Self { filters, excludes: value.excludes, -- cgit v1.2.3-70-g09d2