Revert experimental Windows change

ticket-769
Vadim vtroshchinskiy 2024-09-19 19:48:09 +02:00
parent 7ba18b411c
commit ce662e07bd
1 changed files with 11 additions and 2 deletions

View File

@ -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: