Skip to content

Commit

Permalink
fix: extend regex for vm name
Browse files Browse the repository at this point in the history
  • Loading branch information
chornberger-c2c committed Jan 23, 2024
1 parent 0afd3a1 commit c128be6
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 c128be6

Please sign in to comment.