Skip to content

Commit

Permalink
Change to remove synchronization to leave it up to client to handle
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrmurach committed Oct 21, 2017
1 parent bedc523 commit 18948b1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/tty/command.rb
@@ -1,8 +1,6 @@
# encoding: utf-8
# frozen_string_literal: true

require 'rbconfig'
require 'monitor'

require_relative 'command/cmd'
require_relative 'command/exit_error'
Expand All @@ -16,8 +14,6 @@

module TTY
class Command
include MonitorMixin

ExecuteError = Class.new(StandardError)

TimeoutExceeded = Class.new(StandardError)
Expand Down Expand Up @@ -50,7 +46,6 @@ def self.record_separator=(sep)
#
# @api public
def initialize(options = {})
super()
@output = options.fetch(:output) { $stdout }
@color = options.fetch(:color) { true }
@uuid = options.fetch(:uuid) { true }
Expand Down Expand Up @@ -174,7 +169,7 @@ def command(*args)
def execute_command(cmd, &block)
dry_run = @dry_run || cmd.options[:dry_run] || false
@runner = select_runner(dry_run).new(cmd, @printer)
synchronize { @runner.run!(&block) }
@runner.run!(&block)
end

# @api private
Expand Down

0 comments on commit 18948b1

Please sign in to comment.