fix: do not write a newline to an empty xmllist (#5514)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
prevents issues with processing files when there are empty xmllists issue only shows when building with very few languages Co-authored-by: Darragh Elliott <me@delliott.net> Reviewed-on: #5514 Co-authored-by: delliott <delliott@fsfe.org> Co-committed-by: delliott <delliott@fsfe.org>
This commit was merged in pull request #5514.
This commit is contained in:
@@ -99,7 +99,7 @@ def _update_for_base( # noqa: PLR0913
|
||||
)
|
||||
update_if_changed(
|
||||
Path(f"{base.parent}/.{base.name}.xmllist"),
|
||||
("\n".join(sorted(matching_files)) + "\n"),
|
||||
"\n".join(sorted(matching_files)) + "\n" if matching_files else "",
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user