Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot handle submodules with spaces #10

Open
cbuchart opened this issue Nov 29, 2022 · 0 comments
Open

Cannot handle submodules with spaces #10

cbuchart opened this issue Nov 29, 2022 · 0 comments

Comments

@cbuchart
Copy link
Contributor

An exception is thrown when trying to access submodules which name includes an space:

For example, following log is in a repository with a submodule named "Engine SDK":

fatal: cannot change to './external/Engine': No such file or directory
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/threading.py", line 910, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/cbuchart/Library/Python/3.9/lib/python/site-packages/parallelforeachsubmodule/pfs.py", line 22, in worker
    PFSProcess(submodule, path, command, counter, output_filter, cmd_func, output_func).run()
  File "/Users/cbuchart/Library/Python/3.9/lib/python/site-packages/parallelforeachsubmodule/process.py", line 15, in __init__
    self.__active_branch = self.get_current_branch(self.__cwd)[:-1]
  File "/Users/cbuchart/Library/Python/3.9/lib/python/site-packages/parallelforeachsubmodule/process.py", line 24, in get_current_branch
    return sub.check_output(['git', '-C', path, 'rev-parse', '--abbrev-ref', 'HEAD']).decode('utf-8')
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', '-C', './external/Engine', 'rev-parse', '--abbrev-ref', 'HEAD']' returned non-zero exit status 128.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant