fix(cli): support binary files with @ notation#2753
Merged
Conversation
ae3a56b to
39650ae
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2753 +/- ##
=======================================
Coverage 96.47% 96.47%
=======================================
Files 89 89
Lines 5814 5819 +5
=======================================
+ Hits 5609 5614 +5
Misses 205 205
Flags with carried forward coverage won't be shown. Click here to find out more.
|
bab6802 to
08630ef
Compare
@ notation
08630ef to
376ce65
Compare
376ce65 to
a4d0b78
Compare
nejch
approved these changes
Jan 3, 2024
nejch
left a comment
Member
There was a problem hiding this comment.
@JohnVillalovos thanks a lot, looks nice! Maybe we can just add that one additional I/O error that I think we can expect to happen with OS paths?
Support binary files being used in the CLI with arguments using the `@` notation. For example `--avatar @/path/to/avatar.png` Also explicitly catch the common OSError exception, which is the parent exception for things like: FileNotFoundError, PermissionError and more exceptions. Remove the bare exception handling. We would rather have the full traceback of any exceptions that we don't know about and add them later if needed. Closes: #2752
a4d0b78 to
0b33192
Compare
nejch
approved these changes
Jan 4, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support binary files being used in the CLI with arguments using the
@notation. For example--avatar @/path/to/avatar.pngAlso explicitly catch the common FileNotFoundError and PermissionError
exceptions.
Remove the bare exception handling. We would rather have the full
traceback of any exceptions that we don't know about and add them
later if needed.
Closes: #2752