Compare commits

...

2 Commits

Author SHA1 Message Date
4aa6a65e6c Work around strange Python anomaly
Apparently, `True` is both an instance of `int` and `bool`, which is a
change and is very strange. Instead flip the conditional here.
2023-08-17 09:55:19 -04:00
81e16e99f6 Correct entrypoint for CLI package 2023-08-17 00:27:45 -04:00
2 changed files with 9 additions and 9 deletions

View File

@ -93,14 +93,14 @@ def finish(success=True, data=None, formatter=None):
else: else:
echo(CLI_CONFIG, data) echo(CLI_CONFIG, data)
# Allow passing # Allow passing raw values if not a bool
if isinstance(success, int): if isinstance(success, bool):
exit(success) if success:
exit(0)
if success: else:
exit(0) exit(1)
else: else:
exit(1) exit(success)
def version(ctx, param, value): def version(ctx, param, value):

View File

@ -3,7 +3,7 @@ from setuptools import setup
setup( setup(
name="pvc", name="pvc",
version="0.9.63", version="0.9.63",
packages=["pvc", "pvc.lib"], packages=["pvc.cli", "pvc.lib"],
install_requires=[ install_requires=[
"Click", "Click",
"PyYAML", "PyYAML",
@ -14,7 +14,7 @@ setup(
], ],
entry_points={ entry_points={
"console_scripts": [ "console_scripts": [
"pvc = pvc.pvc:cli", "pvc = pvc.cli.cli:cli",
], ],
}, },
) )