Skip to content
13 changes: 9 additions & 4 deletions lib/vanagon/platform/defaults/osx-14-x86_64.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@
plat.provision_with "sudo dscl . -create /Users/test NFSHomeDirectory /Users/test"
plat.provision_with "sudo dscl . -passwd /Users/test password"
plat.provision_with "sudo dscl . -merge /Groups/admin GroupMembership test"
plat.provision_with "echo 'test ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/username"
plat.provision_with "mkdir -p /etc/homebrew"
plat.provision_with "echo 'test ALL=(ALL:ALL) NOPASSWD: ALL' | sudo tee /etc/sudoers.d/username > /dev/null"
plat.provision_with "sudo mkdir -p /etc/homebrew"
plat.provision_with "cd /etc/homebrew"
plat.provision_with "createhomedir -c -u test"
plat.provision_with %Q(su test -c 'echo | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"')
plat.provision_with "sudo createhomedir -c -u test"
if File.directory?("/usr/local/var/homebrew") || File.directory?("/usr/local/Homebrew")
plat.provision_with "sudo chown -R test /usr/local/var/homebrew /usr/local/share/zsh /usr/local/share/zsh/site-functions \
/usr/local/etc/bash_completion.d /usr/local/lib/pkgconfig /usr/local/share/aclocal /usr/local/share/locale"
else
plat.provision_with %Q(sudo su test -c 'echo | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"')
end
plat.vmpooler_template "macos-14-x86_64"
end
2 changes: 1 addition & 1 deletion lib/vanagon/platform/osx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def install_build_dependencies(list_build_dependencies)
<<-HERE.undent
mkdir -p /etc/homebrew
cd /etc/homebrew
su test -c '#{@brew} install #{list_build_dependencies.join(' ')}'
sudo su test -c '#{@brew} install #{list_build_dependencies.join(' ')}'
HERE
end

Expand Down