Skip to content

Commit

Permalink
Check if the server runs within Guard or from CLI.
Browse files Browse the repository at this point in the history
  • Loading branch information
netzpirat committed Jan 9, 2012
1 parent e26df3e commit 8c76644
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/guard/jasmine/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def start_rack_server(port, environment, server)
::Guard::UI.info "Guard::Jasmine starts #{ server } test server on port #{ port } in #{ environment } environment."

self.process = ChildProcess.build('rackup', '-E', environment.to_s, '-p', port.to_s, '-s', server.to_s)
self.process.io.inherit! if ::Guard.options[:verbose]
self.process.io.inherit! if ::Guard.respond_to?(:options) && ::Guard.options[:verbose]
self.process.start

rescue Exception => e
Expand All @@ -73,7 +73,7 @@ def start_jasmine_gem_server(port)
::Guard::UI.info "Guard::Jasmine starts Jasmine Gem test server on port #{ port }."

self.process = ChildProcess.build('rake', 'jasmine', "JASMINE_PORT=#{ port }")
self.process.io.inherit! if ::Guard.options[:verbose]
self.process.io.inherit! if ::Guard.respond_to?(:options) && ::Guard.options[:verbose]
self.process.start

rescue Exception => e
Expand Down

0 comments on commit 8c76644

Please sign in to comment.