Skip to content

Commit

Permalink
Relax version verification (#44)
Browse files Browse the repository at this point in the history
* Relax version verification

Signed-off-by: Caio Amaral <[email protected]>
Co-authored-by: Carlos Agüero <[email protected]>
  • Loading branch information
caioaamaral and caguero authored Apr 9, 2021
1 parent d32853a commit 1925384
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ign.in
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,11 @@ if ARGV.include?('--force-version')

# Sanity check: Verify if we have the command for the specified version.
found = false
required_arr = required_version.split('.')
commands[ARGV[0]].each_with_index do |version, index|
next unless version.first.eql?(required_version)
version_arr = version.first.split('.')
next unless required_arr.zip(version_arr).map \
{ |required, current| required == current }.all?
found = true
version_index = index
break
Expand Down

0 comments on commit 1925384

Please sign in to comment.