Skip to content

Commit

Permalink
Add check.
Browse files Browse the repository at this point in the history
milesj committed Nov 13, 2023
1 parent 523113d commit aa69abd
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -10,6 +10,12 @@
- [Rust](https://github.com/moonrepo/rust-plugin/blob/master/CHANGELOG.md)
- [TOML schema](https://github.com/moonrepo/schema-plugin/blob/master/CHANGELOG.md)

## Unreleased

#### 🐞 Fixes

- Fixed an issue where version detection would read files found in `node_modules` (which you usually don't want).

## 0.22.1

#### 🐞 Fixes
5 changes: 5 additions & 0 deletions crates/core/src/tool.rs
Original file line number Diff line number Diff line change
@@ -546,6 +546,11 @@ impl Tool {
return Ok(None);
}

// TODO move this into plugins
if current_dir.to_string_lossy().contains("node_modules") {
return Ok(None);
}

let has_parser = self.plugin.has_func("parse_version_file");
let result: DetectVersionOutput = self.plugin.cache_func("detect_version_files")?;

0 comments on commit aa69abd

Please sign in to comment.