mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-04 16:13:23 +00:00
Refusing to write the service units when `docsgpt` is not on PATH was wrong. A package installed in a virtualenv is runnable whether or not its console script is on PATH, and CI runs pytest as `python -m pytest`, where argv[0] is a module file: the refusal failed thirteen native tests there. The launcher now prefers the command on PATH, resolved to an absolute path since PATH can hold relative entries, then an argv[0] that can be executed, and otherwise this interpreter with `-m docsgpt`, which works wherever the package is importable. `python -m docsgpt` became an entrypoint of its own and has a test that runs it.
9 lines
159 B
Python
9 lines
159 B
Python
"""``python -m docsgpt`` runs what the ``docsgpt`` command runs."""
|
|
|
|
import sys
|
|
|
|
from docsgpt.cli import main
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|