Class: Dependabot::Python::PipCompileErrorHandler

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

Constant Summary collapse

SUBPROCESS_ERROR =
T.let(/subprocess-exited-with-error/, Regexp)
INSTALLATION_ERROR =
T.let(/InstallationError/, Regexp)
INSTALLATION_SUBPROCESS_ERROR =
T.let(/InstallationSubprocessError/, Regexp)
HASH_MISMATCH =
T.let(/HashMismatch/, Regexp)

Instance Method Summary collapse

Instance Method Details

#handle_pipcompile_error(error) ⇒ Object

Raises:

  • (DependencyFileNotResolvable)


584
585
586
587
588
589
# File 'lib/dependabot/python/update_checker/pip_compile_version_resolver.rb', line 584

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