Forcing administrator for `vagrant up`

to make symlinks in the guest OS when host OS is windows, `vagrant up` needs to be run as administrator. add this above the main configuration block in Vagrantfile


require "ffi"
if FFI::Platform::IS_WINDOWS and ARGV[0] == "up" and system("net session > NUL") == false
puts "Error: Run as Administrator"
exit 127
end

Advertisements
Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s