Skip to content

Support absolute include paths when calling malcontent externally#944

Merged
egibs merged 1 commit into
chainguard-dev:mainfrom
egibs:external-library-includes
May 22, 2025
Merged

Support absolute include paths when calling malcontent externally#944
egibs merged 1 commit into
chainguard-dev:mainfrom
egibs:external-library-includes

Conversation

@egibs
Copy link
Copy Markdown
Member

@egibs egibs commented May 21, 2025

The changes from #937 to replace the relative include path with its absolute path worked in the context of this repository's directory structure but not when installed as a module and used elsewhere (e.g., importing malcontent as a library).

This PR should allow us to locate rules/ regardless of where we call malcontent from. I've validated this where I saw the failure and it works with these changes.

Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
@egibs egibs force-pushed the external-library-includes branch from 4f2c1ca to 6ed3d9e Compare May 21, 2025 23:00
@egibs egibs requested a review from eslerm May 21, 2025 23:00
@egibs egibs marked this pull request as ready for review May 21, 2025 23:01
@egibs egibs changed the title Support absolute paths when calling malcontent externally Support absolute include paths when calling malcontent externally May 21, 2025
@egibs egibs merged commit 417caab into chainguard-dev:main May 22, 2025
12 checks passed
Copy link
Copy Markdown
Contributor

@eslerm eslerm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarifying variables names while adding this check

@egibs egibs deleted the external-library-includes branch May 28, 2025 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants