Skip to content

Commit

Permalink
Fixed an issue where if the collection version has a - then it would …
Browse files Browse the repository at this point in the history
…not be referenced properly from the file path
  • Loading branch information
Tompage1994 committed Apr 17, 2024
1 parent 8ff65fc commit e786937
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelogs/fragments/bug_collection_delete.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
bugfixes:
- Fixed an issue where if version was not specified in ah_collection and state=absent then the module will fail
- Fixed an issue where if the collection version has a '-' then it would not be referenced properly from the file path
...
2 changes: 1 addition & 1 deletion plugins/modules/ah_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def main():
if version:
pass
elif path:
version = path.split("-")[-1].replace('.tar.gz', '')
version = "-".join(path.split("-")[2:]).replace('.tar.gz', '')

# Attempt to look up an existing item based on the provided data
if version:
Expand Down

0 comments on commit e786937

Please sign in to comment.