Vagrant up not working in git bash admin mode

34 views
Skip to first unread message

Barun Tayenjam

unread,
Sep 26, 2017, 1:43:14 PM9/26/17
to Vagrant

Vagrant version

2.0

Host operating system

Windows 10

Guest operating system

Ubuntu 16.04 LTS

Vagrantfile

-- mode: ruby --

vi: set ft=ruby :

require 'json'
require 'yaml'

VAGRANTFILE_API_VERSION ||= "2"
confDir = $confDir ||= File.expand_path(File.dirname(FILE))

homesteadYamlPath = confDir + "/Homestead.yaml"
homesteadJsonPath = confDir + "/Homestead.json"
afterScriptPath = confDir + "/after.sh"
aliasesPath = confDir + "/aliases"

require File.expand_path(File.dirname(FILE) + '/scripts/homestead.rb')

Vagrant.require_version '>= 1.9.0'

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
if File.exist? aliasesPath then
config.vm.provision "file", source: aliasesPath, destination: "/tmp/bash_aliases"
config.vm.provision "shell" do |s|
s.inline = "awk '{ sub("\r$", ""); print }' /tmp/bash_aliases > /home/vagrant/.bash_aliases"
end
end

if File.exist? homesteadYamlPath then
    settings = YAML::load(File.read(homesteadYamlPath))
elsif File.exist? homesteadJsonPath then
    settings = JSON.parse(File.read(homesteadJsonPath))
else
    abort "Homestead settings file not found in #{confDir}"
end

Homestead.configure(config, settings)

if File.exist? afterScriptPath then
    config.vm.provision "shell", path: afterScriptPath, privileged: false
end

if defined? VagrantPlugins::HostsUpdater
    config.hostsupdater.aliases = settings['sites'].map { |site| site['map'] }
end

end

Debug output

https://gist.github.com/barunTayenjam/a61eaa2b1fe9f544067c0418271b06ad

Expected behavior

Running vagrant up in Git Bash from administration mode giving error

Actual behavior

Running vagrant up in Git Bash from administration mode giving error

Steps to reproduce

  1. Run Git Bash as Admin mode in windows 10
  2. Run Vagrant up

I am basically trying to solve this issue https://stackoverflow.com/questions/46409402/symlink-protocol-error-in-vagrant-2-0

Thanks in Advance

Reply all
Reply to author
Forward
0 new messages