Skip to content

Commit

Permalink
Merge pull request #61 from hathitrust/history_already_exists_error
Browse files Browse the repository at this point in the history
Fix spurious error exit from `add_monthly_and_dump_redirects.rb`.
  • Loading branch information
aelkiss authored Oct 10, 2024
2 parents 5cfa455 + c563a19 commit af5e4ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/add_monthly_and_dump_redirects.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ def usage
exit 1
end

# Argo daily workflow calls this each day, it is not an error to have already done the work.
if File.exist?(new_history_file)
LOGGER.error "#{new_history_file} already exists. Rename/delete it first"
exit 1
LOGGER.info "#{new_history_file} already exists. Exiting."
exit 0
end

LOGGER.info "Will read from #{old_history_file}"
Expand Down

0 comments on commit af5e4ff

Please sign in to comment.