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

Read the first ten lines of a config to check for headers #51

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

Itxaka
Copy link
Member

@Itxaka Itxaka commented Sep 14, 2023

There could be comments before the cloud-config header or jinja expressions as we found already[0] so our current header check its a bit strict.

This patch makes it so er read the first ten lines of the config source, check for # at the start and then check for the headers as we did before, so we are a bit more letinent in case the cloud-config header is not the first thing in the file

Fixes: kairos-io/kairos#1714

There could be comments before the cloud-config header or jinja
expressions as we found already[0] so our current header check its a bit
strict.

This patch makes it so er read the first ten lines of the config source,
check for # at the start and then check for the headers as we did
before, so we are a bit more letinent in case the cloud-config header is
not the first thing in the file

Signed-off-by: Itxaka <itxaka@kairos.io>
@Itxaka Itxaka requested a review from a team September 14, 2023 15:13
@Itxaka Itxaka merged commit 699aa62 into main Sep 15, 2023
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.

Add more flexibility to cloud-config headers
2 participants