Support creating hardlinks
Closes #334
Codecov Report
Attention: Patch coverage is 80.00000% with 7 lines in your changes missing coverage. Please review.
Project coverage is 85.99%. Comparing base (
b8891c5) to head (a74b238). Report is 12 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/dotbot/plugins/link.py | 80.00% | 7 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #372 +/- ##
==========================================
+ Coverage 85.56% 85.99% +0.42%
==========================================
Files 20 20
Lines 693 721 +28
==========================================
+ Hits 593 620 +27
- Misses 100 101 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Hi @anishathalye, have you had a chance to look at this PR? Is there anything else you need in order to merge it? Thanks.
Not a fan of Copilot.
I'll see what I can do to address those concerns, but it's going to take a bit because life is busy currently!
@anishathalye I've addressed the cases you suggested.
In addition, I attempted to make the complex warning-message-handling logic clearer by rearranging and regrouping the conditions.
It may be easier to read outside of this PR's diff context:
https://github.com/kurtmckee/pr-dotbot/blob/hardlinks-issue-334/src/dotbot/plugins/link.py#L278-L323
Thanks! There was a small bug with the refactor to _link(), which tried creating the link first and showed an error otherwise—it was using os.exists(), but we need os.lexists() to detect broken symbolic links and show the correct error message (the consequence was that we got a "Link failed" error instead of an "Invalid link" error). In the interest of time, I added a test and fixed this small bug.
Squashed in 5614642 and merged in 64d2330b2ee139f5c9603d10f19cadb07c65c234, thank you for submitting this pull request!