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

Improve error message when we pass a directory to debug-files check #2034

Merged
merged 2 commits into from
Apr 22, 2024

Conversation

szokeasaurusrex
Copy link
Member

See #2033.

Currently, the debug-files check command only supports checking individual files. However, the error message we emit when passing a directory is a very vague error: Unsupported file. This change improves the error message. We should still consider #2033's suggestion of supporting recursive search through directories for this command.

See #2033. This is intended as a quick fix for the issue; we should still consider implementing the recursive check functionality suggested in #2033, since it would provide a better user experience.
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.
Copy link
Contributor

@elramen elramen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@szokeasaurusrex
Copy link
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.

Copy link
Member

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@szokeasaurusrex
Copy link
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!

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.

3 participants