Merge pull request #7467 from mitchellh/sethvargo/check_output

Check stdout instead of process output
This commit is contained in:
Seth Vargo 2016-06-16 22:27:13 +02:00 committed by GitHub
commit 5e0f5ae9df
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ module Vagrant
begin begin
username = ENV["USERNAME"] username = ENV["USERNAME"]
process = Subprocess.execute("net", "localgroup", "Hyper-V Administrators") process = Subprocess.execute("net", "localgroup", "Hyper-V Administrators")
return process.include?(username) return process.stdout.include?(username)
rescue Errors::CommandUnavailableWindows rescue Errors::CommandUnavailableWindows
return false return false
end end