Vagrant up not working in git bash admin mode

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Vagrant up not working in git bash admin mode

Barun Tayenjam

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

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/849305cb-a159-44e4-979b-101cb77c85b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.