From ff427c96500945f2256a71f9576f91e20a1299f8 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 1 Apr 2020 17:17:30 +1100 Subject: [PATCH] ci: Support joining sdkconfig.ci files that don't end in a newline If trailing newline is missing, the last line of that item gets merged with the first line of the next item. --- tools/find_build_apps/cmake.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/find_build_apps/cmake.py b/tools/find_build_apps/cmake.py index b82e6b9999..5a8ebffbc1 100644 --- a/tools/find_build_apps/cmake.py +++ b/tools/find_build_apps/cmake.py @@ -73,6 +73,8 @@ class CMakeBuildSystem(BuildSystem): logging.debug("Appending {} to sdkconfig".format(sdkconfig_name)) with open(sdkconfig_path, "r") as f_in: for line in f_in: + if not line.endswith("\n"): + line += "\n" f_out.write(os.path.expandvars(line)) # Also save the sdkconfig file in the build directory shutil.copyfile(