From ce662e07bdce59532c5e75868e63f3d15c012879 Mon Sep 17 00:00:00 2001 From: Vadim Troshchinskiy Date: Thu, 19 Sep 2024 19:48:09 +0200 Subject: [PATCH] Revert experimental Windows change --- gitlib/gitlib.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/gitlib/gitlib.py b/gitlib/gitlib.py index 9d5506b..205b856 100755 --- a/gitlib/gitlib.py +++ b/gitlib/gitlib.py @@ -1340,10 +1340,19 @@ class OpengnsysGitLibrary: self.logger.debug(f"Adding symlink: {lnk}") add_files.append(lnk) + add_files_new = [] + for file in add_files: + if os.path.exists(os.path.join(path, file)): + add_files_new = add_files_new + [file] + else: + self.logger.warning(f"We wanted to add {file} but it wasn't found. Please debug.") + + add_files = add_files_new + self.logger.debug("Adding %d files" % len(add_files)) with OperationTimer(self, "add all files"): - subprocess.run(["git", "add"] + add_files, check=True, cwd=path) - #repo.index.add(items = add_files, force=True, ) + #subprocess.run(["git", "add"] + add_files, check=True, cwd=path) + repo.index.add(items = add_files, force=True ) # FIXME: This shouldn't actually happen, we shouldn't have any untracked files if self.debug_check_for_untracked_files: