From f41f7bd8ff761a0435c6bf0e96f37fb0f46788be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cenk=20G=C3=BCndo=C4=9Fan?= Date: Fri, 16 Sep 2016 17:15:24 +0200 Subject: [PATCH] vagrant: prevent error by checking existence of .gitconfig --- Vagrantfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 4f5bc07c67..25d4999d84 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,6 +1,8 @@ # -*- mode: ruby -*- # vi: set ft=ruby : +require 'fileutils' + Vagrant.configure(2) do |config| # For a complete reference, please see the online documentation at # https://docs.vagrantup.com. @@ -55,6 +57,9 @@ Vagrant.configure(2) do |config| '--vendorid', '0x0d28', '--productid', '0x0204'] end - config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig" + if File.exists?(File.join(Dir.home, ".gitconfig")) + config.vm.provision "file", source: File.join(Dir.home, ".gitconfig"), destination: ".gitconfig" + end + config.vm.provision "shell", path: "dist/tools/vagrant/bootstrap.sh" end