mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-06-09 00:32:06 -04:00
fix: cleanup implementation while setting package version
This commit is contained in:
parent
dc373e4fc0
commit
3ce8ffb693
1 changed files with 3 additions and 3 deletions
|
|
@ -427,11 +427,11 @@ gathered version stdout version:
|
|||
def set_gathered_ansible_package_version(ansible_package, stdout_output)
|
||||
if !stdout_output.empty?
|
||||
first_line = stdout_output.lines[0]
|
||||
ansible_version_pattern = first_line.match(/(^#{ansible_package}\s+)(.+)$/)
|
||||
ansible_version_pattern = first_line.match(/^#{ansible_package}\s+(.+)$/)
|
||||
if ansible_version_pattern
|
||||
_, gathered_version, _ = ansible_version_pattern.captures
|
||||
gathered_version = ansible_version_pattern.captures.first
|
||||
gathered_version.strip!
|
||||
if gathered_version
|
||||
if !gathered_version.empty?
|
||||
gathered_version_major = gathered_version.match(/(\d+)\..+$/).captures[0].to_i
|
||||
gathered_version_minor = gathered_version.match(/\d+\.(\d+)\..+$/).captures[0].to_i
|
||||
@ansible_package_version_map[ansible_package] = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue