-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
When ansible-galaxy is not installed, or not in PATH, orionutils.generator.build_collection fails with an assert m, stdout AssertionError.
# 👍
$ galaxykit -u admin -p admin collection upload
{"namespace": "admin", "name": "collection_dep_a_robyoszi", "version": "1.0.0", "published": false}
# ❗
$ mv ~/.local/bin/ansible-galaxy{,.bak}
# 👎
$ galaxykit -u admin -p admin collection upload
Traceback (most recent call last):
File "/home/himdel/.local/bin/galaxykit", line 8, in <module>
sys.exit(main())
File "/home/himdel/.local/lib/python3.9/site-packages/galaxykit/command.py", line 254, in main
artifact = collections.upload_test_collection(
File "/home/himdel/.local/lib/python3.9/site-packages/galaxykit/collections.py", line 23, in upload_test_collection
artifact = build_collection(
File "/home/himdel/.local/lib/python3.9/site-packages/orionutils/generator.py", line 210, in build_collection
assert m, stdout
AssertionError
Any way to detect and warn about this better? If we can tell running an external command failed, it may be worth it to throw an exception along the lines of "you forgot to pip install ansible".
Or should this package actually depend on ansible?
(Cc @brumik)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels