Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Commit

Permalink
Fix redir version fetching.
Browse files Browse the repository at this point in the history
"" || "something" doesn't really work. Have to check for the actual string
length to determine if got something or not out of the pipe.
  • Loading branch information
ebobby committed Sep 25, 2018
1 parent 2a5510b commit f750bf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/vagrant-lxc/action/forward_ports.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def store_redir_pid(host_port, redir_pid)
def 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 = stdout.empty? ? stderr : stdout
version.split('.')[0].to_i
end

Expand Down

0 comments on commit f750bf4

Please sign in to comment.