Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug fix] incorrect index increment #213

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/xcov/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,10 @@ def process_xcresults!(xcresult_paths)

# Rename each file with global index
tmp_report_paths.each_with_index do |item, i|
File.rename(tmp_archive_paths[i], "#{output_path}/xccovarchive-#{index + i}.xccovarchive")
File.rename(item, "#{output_path}/xccovreport-#{index + i}.xccovreport")
index += 1
current_index = index + 1
File.rename(tmp_archive_paths[i], "#{output_path}/xccovarchive-#{current_index}.xccovarchive")
File.rename(item, "#{output_path}/xccovreport-#{current_index}.xccovreport")
index = current_index
end
rescue
UI.error("Error occured while exporting xccovreport from xcresult '#{xcresult_path}'")
Expand Down