Improve error message when we pass a directory to debug-files check#2034
Merged
szokeasaurusrex merged 2 commits intomasterfrom Apr 22, 2024
Merged
Improve error message when we pass a directory to debug-files check#2034szokeasaurusrex merged 2 commits intomasterfrom
debug-files check#2034szokeasaurusrex merged 2 commits intomasterfrom
Conversation
This test verifies that the `sentry-cli debug-files check` command results in an error with a meaningful message when the path passed leads to a directory.
Member
Author
|
Thanks for the review, @elramen! @Swatinem and @loewenheim, I would also appreciate a review from one of you, since @elramen is new to CLI code reviews. |
Swatinem
approved these changes
Apr 19, 2024
Contributor
Swatinem
left a comment
There was a problem hiding this comment.
code looks good.
this is a bit surprising though, other commands treat the path argument as a glob pattern and will recurse into subdirectories and even zip files in some cases.
Member
Author
|
@Swatinem yeah, that's what I thought too. I would like to implement similar behavior here, this is a quick fix until I get around to that! |
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.
See #2033.
Currently, the
debug-files checkcommand only supports checking individual files. However, the error message we emit when passing a directory is a very vagueerror: Unsupported file. This change improves the error message. We should still consider #2033's suggestion of supporting recursive search through directories for this command.