diff --git a/lib/vagrant/util/subprocess.rb b/lib/vagrant/util/subprocess.rb index f733ed3ce..9ee04376c 100644 --- a/lib/vagrant/util/subprocess.rb +++ b/lib/vagrant/util/subprocess.rb @@ -27,7 +27,7 @@ module Vagrant def initialize(*command) @options = command.last.is_a?(Hash) ? command.pop : {} @command = command - @command[0] = Which.which(@command[0]) if !File.file? @command[0] + @command[0] = Which.which(@command[0]) if !File.file?(@command[0]) if !@command[0] raise Errors::CommandUnavailableWindows, file: command[0] if Platform.windows? raise Errors::CommandUnavailable, file: command[0]