From fe359a6c4b74c5f29c94c6fd7e10865a9ae77302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Rish=C3=B8j?= Date: Thu, 11 Jun 2015 02:33:50 +0200 Subject: [PATCH] Let `util_path` return nil on failure Array#each returns the [array] object it was invoked upon, so in case `util_path` doesn't find the executable, it would return the array `['/usr/local/bin', '/usr/bin']`, despite the rest of the code relies on it returning nil in case of failure. --- lib/vagrant-parallels/driver/base.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/vagrant-parallels/driver/base.rb b/lib/vagrant-parallels/driver/base.rb index 48b1355f..8b835c5b 100644 --- a/lib/vagrant-parallels/driver/base.rb +++ b/lib/vagrant-parallels/driver/base.rb @@ -325,6 +325,7 @@ def util_path(bin) path = File.join(folder, bin) return path if File.file?(path) end + nil end end