Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENT-10229: Improved the warning text when an added local module contains a policy file with an autorun tag #200

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

jakub-nt
Copy link
Contributor

No description provided.

@jakub-nt jakub-nt marked this pull request as draft July 30, 2024 12:23
…y file with an autorun tag

Ticket: ENT-10229
Signed-off-by: jakub-nt <[email protected]>
@jakub-nt jakub-nt marked this pull request as ready for review July 30, 2024 14:00
@cf-bottom
Copy link

Thank you for submitting a PR! Maybe @larsewi can review this?

Copy link
Contributor

@larsewi larsewi left a comment

Choose a reason for hiding this comment

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

Great 🚀

is_autorun_enabled = any(
m in modules_available for m in ["autorun", "./def.json"]
) # only a heuristic

for file in policy_files:
if _has_autorun_tag(file):
Copy link
Member

Choose a reason for hiding this comment

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

Could and here instead of nested ifs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was on purpose, as the comment at https://github.com/cfengine/cfbs/pull/200/files#diff-16156b18d8d412a896d384b37f3947253ba5f775b6357a7205e0ef533d776d53R301 applies to the first condition, but not the second.

@olehermanse olehermanse merged commit 170b1f9 into cfengine:master Aug 2, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants