Skip to content

Commit 2c5d0da

Browse files
author
Seth Goings
committed
Merge pull request #4692 from sgoings/vagrant-bash-fix
fix(Vagrantfile): specifically use bash to source utils.sh
2 parents c8100da + 67af063 commit 2c5d0da

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Vagrantfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# # vi: set ft=ruby :
33

44
require 'fileutils'
5+
require 'open3'
56

67
Vagrant.require_version ">= 1.6.5"
78

@@ -16,7 +17,8 @@ CONTRIB_UTILS_PATH = File.join(File.dirname(__FILE__), "contrib", "utils.sh")
1617
# Make variables from contrib/utils.sh accessible
1718
if File.exists?(CONTRIB_UTILS_PATH)
1819
cu_vars = Hash.new do |hash, key|
19-
value = `. #{CONTRIB_UTILS_PATH} 2> /dev/null && echo $#{key}`.chomp
20+
stdin, stdout, stderr = Open3.popen3("/usr/bin/env", "bash", "-c", "source #{CONTRIB_UTILS_PATH} && echo $#{key}")
21+
value = stdout.gets.chomp
2022
hash[key] = value unless value.empty?
2123
end
2224
else

0 commit comments

Comments
 (0)