lib/goliath/application.rb in goliath-1.0.1 vs lib/goliath/application.rb in goliath-1.0.2
- old
+ new
@@ -123,10 +123,14 @@
str.split('_').map { |e| e.capitalize }.join
end
end
at_exit do
- if $!.nil? && $0 == Goliath::Application.app_file
+ # Only run the application if ...
+ # - we want it to run
+ # - there has been no exception raised
+ # - the file that has been run, is the goliath application file
+ if Goliath.run_app_on_exit? && $!.nil? && $0 == Goliath::Application.app_file
Application.run!
end
end
end