Skip to content

Commit

Permalink
Update update_script.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
kzhuklinets authored Apr 16, 2024
1 parent c4baf11 commit 34142f9
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions updater/bin/update_script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -501,20 +501,20 @@ def show_diff(original_file, updated_file)
options: $options[:updater_options]
}
fetcher = Dependabot::FileFetchers.for_package_manager($package_manager).new(**fetcher_args)
begin
if clone
puts "Cloning repository into #{$options[:repo_contents_path]}"
fetcher.clone_repo_contents
else
puts "Fetching #{package_manager} dependency files ..."
# Assuming you have a method to fetch dependency files here
end
rescue => e
puts "An error occurred: #{e.message}"
file = File.open("/home/dependabot/dependabot-updater/git.store")
puts file.readlines.map(&:chomp)
file.close
end
# begin
# if clone
# puts "Cloning repository into #{$options[:repo_contents_path]}"
# fetcher.clone_repo_contents
# else
# puts "Fetching #{package_manager} dependency files ..."
# # Assuming you have a method to fetch dependency files here
# end
# rescue => e
# puts "An error occurred: #{e.message}"
# file = File.open("/home/dependabot/dependabot-updater/git.store")
# puts file.readlines.map(&:chomp)
# file.close
# end
files = fetcher.files
commit = fetcher.commit
puts "Found #{files.length} dependency file(s) at commit #{commit}"
Expand Down

0 comments on commit 34142f9

Please sign in to comment.