Class: Dependabot::Uv::PipCompileErrorHandler

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/uv/update_checker/pip_compile_version_resolver.rb

Constant Summary collapse

SUBPROCESS_ERROR =
/subprocess-exited-with-error/
INSTALLATION_ERROR =
/InstallationError/
INSTALLATION_SUBPROCESS_ERROR =
/InstallationSubprocessError/
HASH_MISMATCH =
/HashMismatch/

Instance Method Summary collapse

Instance Method Details

#handle_pipcompile_error(error) ⇒ Object

Raises:

  • (DependencyFileNotResolvable)


613
614
615
616
617
618
# File 'lib/dependabot/uv/update_checker/pip_compile_version_resolver.rb', line 613

def handle_pipcompile_error(error)
  return unless error.match?(SUBPROCESS_ERROR) || error.match?(INSTALLATION_ERROR) ||
                error.match?(INSTALLATION_SUBPROCESS_ERROR) || error.match?(HASH_MISMATCH)

  raise DependencyFileNotResolvable, "Error resolving dependency"
end