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
Doesn't work for self hosted github enterprise? #2
Comments
I'll need to look into this more deeply but it might be because I updated the |
@jdoiro3 INFO - Building documentation...
INFO - Multirepo plugin importing docs...
[Errno 2] No such file or directory: 'where' The problem is the detection of Git: mkdocs-multirepo-plugin/mkdocs_multirepo_plugin/util.py Lines 51 to 56 in 8570df8
This works for me: output = (
subprocess.run('which git', capture_output=True, text=True, shell=True)
.stdout
.replace("\r", "") # remove carrage return
.split("\n")[0] # handle multiple locations of git.exe
)
pprint(output) # /usr/local/git/bin/git But the detection of the Git version is the next problem: version = search(r'([\d.]+)', stdout).group(1).split(".")[:2]
AttributeError: 'NoneType' object has no attribute 'group'
Maybe it would help to use a library for handling Git, like GitPython. |
@froschdesign, thanks for looking into this. I'm pretty sure I know what's going on and how to resolve this issue. The below function only checks for Linux and not macOS, leading to where git being called which isn't a macOS command. mkdocs-multirepo-plugin/mkdocs_multirepo_plugin/util.py Lines 93 to 105 in 0b14871
Also - that's 100% a good idea but didn't go with GitPython it didn't support the advance features like sparse clone or the --depth argument, which are optimizations. I'll go ahead and make some changes pretty soon and also add macOS to my testing. |
I just pushed changes that fixed this bug. Versions at or above v0.2.9 should work on macOS. I was able to confirm the bug and fix with another macOS machine. @froschdesign or @acastro2, can one of you confirm it works on your end? |
@jdoiro3 |
I think it doesn't work for self-hosted github enterprise. The URL here is git..com (only vpn accessible), and when running mkdocs serve:
This is an example of the mkdocs.yml:
The text was updated successfully, but these errors were encountered: