-
Notifications
You must be signed in to change notification settings - Fork 892
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
Remove redundant message if an error occurs during package extraction #3464
Remove redundant message if an error occurs during package extraction #3464
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So yes, for that specific ENOSPC
error it would still make sense. My question is if there are other potential errors for unpack_without_first_dir()
that might be indirectly caused by a lack of disk space, which could still benefit from the existing hint?
The hint was added in https://github.com/rust-lang/rustup/pull/2721/files#diff-47e56d6d43f3702f3f6de0b34ad1988bcccfdba0d493fdfa247c8fd544195327R153, which is sort of generic (conversion to anyhow), so it doesn't necessarily look like there was a specific reason to add this there? |
Possible errors are return immediately, I think this should be obvious, except for these lines: rustup/src/dist/component/package.rs Line 314 in a4dd7d0
rustup/src/dist/component/package.rs Line 358 in a4dd7d0
rustup/src/dist/component/package.rs Line 493 in a4dd7d0
rustup/src/dist/component/package.rs Line 517 in a4dd7d0
The Lines 187 to 210 in a4dd7d0
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does seem fair to conclude that this is not the right place to narrow the context to suggest ENOSPC
if that is necessary at all. Given that was added in a commit that was arguably unrelated, I think it makes sense to remove it all, though maybe @rbtcollins remembers why he thought adding it here was useful.
This is the message when there is an error on extracting, it does contain the source of the cause. For example, when out of space on extraction:
This PR remove the message in parentheses like this:
Note: the error message already contains the source of cause by the selector "{:#}" in
cli::common::report_error
.See also: https://docs.rs/anyhow/latest/anyhow/struct.Error.html#display-representations