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

fix: Avoid printing an extra newline when exporting resources #3721

Merged
merged 1 commit into from
Mar 24, 2023

Conversation

yiannistri
Copy link
Contributor

Closes #3593

Following Hidde's hint, the change in this PR should prevent extra newlines from being printed. This affects both the flux export .. command and the --export flag used in other Flux commands.

Also tested with

flux export .. >> export.yaml
flux export .. >> export.yaml

and it no longer produces a newline between resources in the same file.

Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

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

Thanks a lot for picking this up 🙇

Small suggestion based on second thoughts...

cmd/flux/export.go Outdated Show resolved Hide resolved
exporting

Signed-off-by: Yiannis <yiannistri@users.noreply.github.com>
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @yiannistri

Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

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

Thank you @yiannistri 🥇

@hiddeco hiddeco merged commit 10f8849 into fluxcd:main Mar 24, 2023
@yiannistri yiannistri deleted the 3593-fix-double-newline branch March 24, 2023 10:34
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.

--export results at times in double newline at EOF
3 participants