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.
This commit is contained in:
parent
2f0a57dece
commit
ff427c9650
1 changed files with 2 additions and 0 deletions
|
@ -73,6 +73,8 @@ class CMakeBuildSystem(BuildSystem):
|
||||||
logging.debug("Appending {} to sdkconfig".format(sdkconfig_name))
|
logging.debug("Appending {} to sdkconfig".format(sdkconfig_name))
|
||||||
with open(sdkconfig_path, "r") as f_in:
|
with open(sdkconfig_path, "r") as f_in:
|
||||||
for line in f_in:
|
for line in f_in:
|
||||||
|
if not line.endswith("\n"):
|
||||||
|
line += "\n"
|
||||||
f_out.write(os.path.expandvars(line))
|
f_out.write(os.path.expandvars(line))
|
||||||
# Also save the sdkconfig file in the build directory
|
# Also save the sdkconfig file in the build directory
|
||||||
shutil.copyfile(
|
shutil.copyfile(
|
||||||
|
|
Loading…
Reference in a new issue