From 22bb1c39b1b9441dd5d2661d674100987e937067 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 29 Aug 2016 13:35:35 +0300 Subject: [PATCH] Handle EOL when update VCS ignore file --- examples | 2 +- platformio/commands/init.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/examples b/examples index e614de50..5cafb1f7 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit e614de50bfefe7c0aea1731bebd8afa9e91293e2 +Subproject commit 5cafb1f792a240d719036a9b36fb21e6fd746d05 diff --git a/platformio/commands/init.py b/platformio/commands/init.py index 943cd9cb..f04c7088 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -278,6 +278,8 @@ def init_cvs_ignore(project_dir): if isfile(ignore_path): with open(ignore_path) as fp: current = fp.readlines() + if current and not current[-1].endswith("\n"): + current[-1] += "\n" for d in default: if d not in current: current.append(d)