Exception: OperationInProgressError Private

Inherits:
RuntimeError
  • Object
show all
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

Constructor Details

#initialize(locked_path) ⇒ 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.

Parameters:



491
492
493
494
495
496
497
498
499
500
501
502
# File 'exceptions.rb', line 491

def initialize(locked_path)
  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
  message = <<~EOS
    A `#{full_command}` process has already locked #{locked_path}.#{lock_context}
    Please wait for it to finish or terminate it to continue.
  EOS

  super message
end