Skip to content

Commit

Permalink
Merge pull request #13 from chornberger-c2c/refactor-vm-regex
Browse files Browse the repository at this point in the history
fix: extend regex for vm name
  • Loading branch information
chornberger-c2c authored Jan 23, 2024
2 parents 0afd3a1 + c128be6 commit 8fe24e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vagrant_inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def list_running_boxes():
output = to_text(subprocess.check_output(["vagrant", "global-status", "--prune"])).split('\n')

for line in output:
match = re.search(r"^([a-zA-Z0-9]+)\s+([a-zA-Z0-9\-\_]+).*(running).+?([^\/]+$)", line)
match = re.search(r"^([a-zA-Z0-9]+)\s+([^\/\ ]+).*(running).+?([^\/]+$)", line)
if match:
box_id = str(match.group(1))
box_name = str(match.group(2))
Expand Down

0 comments on commit 8fe24e1

Please sign in to comment.