fix(plugin): respect LIBREFANG_HOME when resolving plugin directory#6136
Merged
Conversation
Contributor
|
Thanks for your first pull request! 🎉 A maintainer will review it soon. While you wait, please make sure:
We aim to provide initial feedback within 7 days. See CONTRIBUTING.md for details. |
houko
approved these changes
Jun 17, 2026
houko
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Correct fix: plugins_dir() previously ignored LIBREFANG_HOME and diverged from config::librefang_home(). Nice that it also fixes the second copy in context_engine/scriptable/mod.rs (which used a . fallback and ignored the env var too), consolidating both onto one helper.
Two non-blocking notes:
- The new test mutates the global
LIBREFANG_HOME, which this crate otherwise avoids on purpose (see the comment inartifact_store.rs::default_artifact_storage_dir_ends_with_data_artifacts). TheENV_LOCKonly serializes the two new tests against each other, not against other tests in the same process that readLIBREFANG_HOMElive (model_catalog::resolve_home_dir,artifact_store::default_artifact_storage_dir). CI is fine since nextest isolates per process; a localcargo test -p librefang-runtimecould flake. Acceptable here since the test genuinely needs to set the var to verify it's honored. - Minor behavior change worth a line in the description: the no-
HOMEfallback shifts from/tmp/librefangto/tmp/.librefangand drops thewarn!, aligning with the canonicallibrefang_home()in the kernel. Intentional, just undocumented.
houko
enabled auto-merge (squash)
June 17, 2026 05:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type
Summary
respect
LIBREFANG_HOMEwhen resolving plugin directorylike
librefang/crates/librefang-kernel/src/config.rs
Lines 504 to 512 in dceae89
Testing
cargo clippy --workspace --all-targets -- -D warningspassescargo test --workspacepassesSecurity