-
Notifications
You must be signed in to change notification settings - Fork 6
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
hermes init
fails with cryptic error message in non-git directory
#308
Comments
Closes by now merged #309 |
@poikilotherm I still see this cryptic message when using hermes init on an empty repository when it does not have an upstream repository set. it would be nice to have a better error message in this case. Steps to reproduce: install latest hermes from git > pipx install git+https://github.com/hermes-hmc/hermes.git
installed package hermes 0.9.0, installed using Python 3.12.3
These apps are now globally available
- hermes
- hermes-marketplace
done! ✨ create a new git repo and init it with a file >mkdir -p /tmp/test && cd /tmp/test
>git init
>echo "test" >> testfile.txt
>git add testfile.txt
>git commit -m "add test file" run hermes init >hermes init
Run subcommand init hermes.log file:
|
It also happens on an existing project from me that has multiple remotes configured in the git config (i.e. we have projects on our local git as well as github): steps to reproduce: git clone https://github.com/dnlbauer/django-signposting
cd django-signplosting
hermes init # this works!
# add second remote
git remote add secondary http://example.com/django-signposting
hermes init # fails |
Thanks for reporting back! I'm assigning @nheeb to look into this 😄 |
When running
hermes init
in a non-git directory, it fails with:This is due to
urlparse()
not "failing" but rather returning empty strings, here:hermes/src/hermes/commands/init/base.py
Line 96 in a67e2f9
It might make sense to wrap
urlparse()
and raise an exception if either ofscheme
ornetloc
is not existent. (Or abort searching for git stuff way earlier.)The text was updated successfully, but these errors were encountered: