class Bundler::CLI

def lock

def lock
  if locked?
    Bundler.ui.info("The bundle is already locked, relocking.")
    remove_lockfiles
  end
  environment = Bundler.load
  environment.lock
rescue GemNotFound, VersionConflict => e
  Bundler.ui.error(e.message)
  Bundler.ui.info "Run `bundle install` to install missing gems"
  exit 128
end