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

backup: fix working directory change #20

Merged
merged 6 commits into from
Jun 25, 2024
Merged

backup: fix working directory change #20

merged 6 commits into from
Jun 25, 2024

Conversation

endorama
Copy link
Owner

backup.Perform was using os.Chdir, which changes working
directory for the entire process. This in practice did not
have any effect, but is the potential source of future bugs
as it's an unexpected occurrence.

Solve this by restoring working directory after executing
the backup.
A dedicated test case is provided.

Copy link

codecov bot commented Jun 23, 2024

Codecov Report

Attention: Patch coverage is 74.07407% with 7 lines in your changes missing coverage. Please review.

Project coverage is 58.23%. Comparing base (b3a9eaf) to head (e961763).
Report is 51 commits behind head on main.

Current head e961763 differs from pull request most recent head 82301b7

Please upload reports for the commit 82301b7 to get more accurate results.

Files Patch % Lines
internal/backup/perform.go 74.07% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #20      +/-   ##
==========================================
+ Coverage   51.70%   58.23%   +6.53%     
==========================================
  Files          30       38       +8     
  Lines         441      510      +69     
==========================================
+ Hits          228      297      +69     
+ Misses        187      178       -9     
- Partials       26       35       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

endorama added 4 commits June 25, 2024 21:34
backup.Perform was using os.Chdir, which changes working
directory for the entire process. This in practice did not
have any effect, but is the potential source of future bugs
as it's an unexpected occurrence.

Solve this by restoring working directory after executing
the backup.
A dedicated test case is provided.
@endorama endorama merged commit 2d25fae into main Jun 25, 2024
6 checks passed
@endorama endorama deleted the backup-chdir-fix branch June 25, 2024 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant