lib/vagrant-notify/action.rb in vagrant-notify-0.5.1 vs lib/vagrant-notify/action.rb in vagrant-notify-0.5.2

- old
+ new

@@ -19,14 +19,22 @@ next if !env[:result] b2.use PrepareData b2.use Call, ServerIsRunning do |env2, b3| if env2[:result] - # TODO: b3.use MessageServerRunning + env[:machine].ui.success("vagrant-notify-server pid: #{env2[:notify_data][:pid]}") else # TODO: b3.use CheckServerPortCollision b3.use StartServer - # TODO: b3.use BackupCommand + + b3.use PrepareData + b3.use Call, ServerIsRunning do |env3, b4| + if env3[:result] + env3[:machine].ui.success("vagrant-notify-server pid: #{env3[:notify_data][:pid]}") + else + env3[:machine].ui.error("Unable to start notification server using #{env3[:machine].config.notify.bind_ip}") + end + end end # Always install the command to make sure we can fix stale ips # on the guest machine b3.use InstallCommand end