Skip to content

Commit

Permalink
check for plugin presence 'vagrant-triggers`
Browse files Browse the repository at this point in the history
before calling `config.trigger.after`
  • Loading branch information
asura-asp committed May 25, 2016
1 parent f4523dd commit 0f8fbd9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions vagrant/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Restart apache when all done (if using apache)
config.vm.provision "shell", run: "always", inline: "service apache2 restart"

config.trigger.after [:up] do
if Vagrant::Util::Platform.darwin?
system("open -a 'Google Chrome.app' https://localhost:7088")
if Vagrant.has_plugin?('vagrant-triggers')
config.trigger.after [:up] do
if Vagrant::Util::Platform.darwin?
system("open -a 'Google Chrome.app' https://localhost:7088")
end
end
end

end

0 comments on commit 0f8fbd9

Please sign in to comment.