From 07a959cc837e5fc315f90364c04b8c2012d72002 Mon Sep 17 00:00:00 2001 From: William Douglas Date: Fri, 28 Feb 2025 09:45:59 -0800 Subject: [PATCH] Ensure content separation for cargo's config.toml The .cargo/config.toml file may exist for a project and the source content configuration that we append needs to have a newline separating it from the existing content. Signed-off-by: William Douglas --- autospec/specfiles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autospec/specfiles.py b/autospec/specfiles.py index 4daa58a..79ef4be 100644 --- a/autospec/specfiles.py +++ b/autospec/specfiles.py @@ -548,7 +548,7 @@ class Specfile(object): if self.config.subdir: self._write_strip("pushd " + self.config.subdir) self._write_strip("mkdir -p .cargo") - self._write_strip(f"echo '{self.config.cargo_vendors}' >> .cargo/config.toml") + self._write_strip(f"echo '\n{self.config.cargo_vendors}' >> .cargo/config.toml") if self.config.subdir: self._write_strip("popd")