Exception: OperationInProgressError Private
- Defined in:
- exceptions.rb
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
Raised when another Homebrew operation is already in progress.
Instance Method Summary collapse
- #initialize(locked_path, waited: nil) ⇒ void constructor private
Constructor Details
#initialize(locked_path, waited: nil) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 |
# File 'exceptions.rb', line 494 def initialize(locked_path, waited: nil) full_command = Homebrew.running_command_with_args.presence || "brew" lock_context = if (env_lock_context = Homebrew::EnvConfig.lock_context.presence) "\n#{env_lock_context}" end advice = if waited "Gave up after waiting #{waited} seconds. Terminate it to continue." else "Please wait for it to finish or terminate it to continue." end = <<~EOS A `#{full_command}` process has already locked #{locked_path}.#{lock_context} #{advice} EOS super end |