redir: fix version parsing

At some point in v 3.x, it outputted version in stderr, then went back
to stdout...
This commit is contained in:
Virgil Dupras 2018-07-04 14:33:51 -04:00
parent 8cfe577b17
commit 8a1e1863a7

View file

@ -107,8 +107,9 @@ module Vagrant
end
def redir_version
# For some weird reason redir prints version information in STDERR
_, version, _ = Open3.capture3 "redir --version"
stdout, stderr, _ = Open3.capture3 "redir --version"
# For some weird reason redir printed version information in STDERR prior to 3.2
version = stdout || stderr
version.split('.')[0].to_i
end