Jordi577 commited on
Commit
19c34f6
·
1 Parent(s): da09152

Resolved an issue in CodeParser.py where Git returned exit status 129 due to repository paths containing whitespace.

Browse files
Files changed (1) hide show
  1. CodeParser.py +2 -2
CodeParser.py CHANGED
@@ -53,11 +53,11 @@ class CodeParser:
53
  try:
54
  if os.path.exists(repo_path):
55
  logging.info(f"Updating existing repository for {language}")
56
- update_command = f"cd {repo_path} && git pull"
57
  subprocess.run(update_command, shell=True, check=True)
58
  else:
59
  logging.info(f"Cloning repository for {language}")
60
- clone_command = f"git clone https://github.com/tree-sitter/tree-sitter-{language} {repo_path}"
61
  subprocess.run(clone_command, shell=True, check=True)
62
  except subprocess.CalledProcessError as e:
63
  logging.error(f"Failed to clone/update repository for {language}. Error: {e}")
 
53
  try:
54
  if os.path.exists(repo_path):
55
  logging.info(f"Updating existing repository for {language}")
56
+ update_command = f'cd "{repo_path}" && git pull'
57
  subprocess.run(update_command, shell=True, check=True)
58
  else:
59
  logging.info(f"Cloning repository for {language}")
60
+ clone_command = f'git clone https://github.com/tree-sitter/tree-sitter-{language} "{repo_path}"'
61
  subprocess.run(clone_command, shell=True, check=True)
62
  except subprocess.CalledProcessError as e:
63
  logging.error(f"Failed to clone/update repository for {language}. Error: {e}")