You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#185 adds autodetecting branch name on omission. But now we have two consecutive optional args on the commandline - branch and repo_dir (target clone path). So if we want to pass just the repo url and repo_dir, it's currently not possible.
Expected behaviour
Tell nbgitpuller to autodetect branch name but specify target directory when called from the commandline
Actual behaviour
If only two arguments are specified on the commandline, they are counted as repo url and branch, not repo url and repo_dir
How to reproduce
❯ gitpuller https://github.com/jupyterhub/jupyterhub target-dir 2 ↵
Traceback (most recent call last):
File "/Users/yuvipanda/.local/share/virtualenvs/nbgitpuller/bin/gitpuller", line 33, in <module>
sys.exit(load_entry_point('nbgitpuller', 'console_scripts', 'gitpuller')())
File "/Users/yuvipanda/code/nbgitpuller/nbgitpuller/pull.py", line 310, in main
for line in GitPuller(
File "/Users/yuvipanda/code/nbgitpuller/nbgitpuller/pull.py", line 78, in __init__
raise ValueError(f"Branch: {self.branch_name} -- not found in repo: {self.git_url}")
ValueError: Branch: target-dir -- not found in repo: https://github.com/jupyterhub/jupyterhub
The text was updated successfully, but these errors were encountered:
I will make the command line arguments keyword instead of positional. The argparser can handle it. Should have looked that up! when i ran into the problem.
Bug description
#185 adds autodetecting branch name on omission. But now we have two consecutive optional args on the commandline - branch and repo_dir (target clone path). So if we want to pass just the repo url and repo_dir, it's currently not possible.
Expected behaviour
Tell nbgitpuller to autodetect branch name but specify target directory when called from the commandline
Actual behaviour
If only two arguments are specified on the commandline, they are counted as repo url and branch, not repo url and repo_dir
How to reproduce
The text was updated successfully, but these errors were encountered: