hatch
hatch copied to clipboard
Running "hatchling version" should give more user friendly error message
Steps to reproduce
- python -m venv hatchling_venv
- source hatchling_venv/bin/activate
- python -m pip install hatchling
- hatchling version
<MB081>~ 🐍 3.9.18 pyenv:
❯ hatchling version
Traceback (most recent call last):
File "/Users/tonychia/.pyenv/versions/3.9.18/bin/hatchling", line 8, in <module>
sys.exit(hatchling())
File "/Users/tonychia/.pyenv/versions/3.9.18/lib/python3.9/site-packages/hatchling/cli/__init__.py", line 26, in hatchling
command(**kwargs)
File "/Users/tonychia/.pyenv/versions/3.9.18/lib/python3.9/site-packages/hatchling/cli/version/__init__.py", line 31, in version_impl
source = metadata.hatch.version.source
File "/Users/tonychia/.pyenv/versions/3.9.18/lib/python3.9/site-packages/hatchling/metadata/core.py", line 1393, in version
raise ValueError(message)
ValueError: Missing `tool.hatch.version` configuration
The error means your project is misconfigured. How would you like the message to be improved? Also I'm curious, what use case do you have for using Hatchling directly rather than Hatch?