Class: CircleCI::CLI::Command::WatchCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- CircleCI::CLI::Command::WatchCommand
- Defined in:
- lib/circleci/cli/command/watch_command.rb
Class Method Summary collapse
-
.run(options) ⇒ Object
rubocop:disable Metrics/MethodLength.
Methods inherited from BaseCommand
build_number, project_name, reponame, setup_token, should_be_pretty
Class Method Details
.run(options) ⇒ Object
rubocop:disable Metrics/MethodLength
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/circleci/cli/command/watch_command.rb', line 11 def run() # rubocop:disable Metrics/MethodLength setup_token @options = @repository = BuildRepository.new(*project_name().split('/')) @client = Networking::CircleCIPusherClient.new.tap(&:connect) @build_watcher = nil bind_status_event loop do stop_existing_watcher_if_needed start_watcher_if_needed sleep 1 end rescue Interrupt say 'Exited' end |