Skip to content

Commit 6efbfc2

Browse files
committed
fix: move clean logic
1 parent 33e01f8 commit 6efbfc2

File tree

1 file changed

+5
-5
lines changed
  • crates/vite_task/src/session/execute

1 file changed

+5
-5
lines changed

crates/vite_task/src/session/execute/spawn.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,16 +201,16 @@ pub async fn spawn_with_tracking(
201201
// Just ignore those accesses.
202202
let relative = RelativePathBuf::new(stripped_path).ok()?;
203203

204-
// Skip .git directory accesses (workaround for tools like oxlint)
205-
if relative.as_path().strip_prefix(".git").is_ok() {
206-
return None;
207-
}
208-
209204
// Clean `..` components — fspy may report paths like
210205
// `packages/sub-pkg/../shared/dist/output.js`. Normalize them for
211206
// consistent behavior across platforms and clean user-facing messages.
212207
let relative = relative.clean();
213208

209+
// Skip .git directory accesses (workaround for tools like oxlint)
210+
if relative.as_path().strip_prefix(".git").is_ok() {
211+
return None;
212+
}
213+
214214
if !resolved_negatives.is_empty()
215215
&& resolved_negatives.iter().any(|neg| neg.is_match(relative.as_str()))
216216
{

0 commit comments

Comments
 (0)