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 guidance #258

Merged
merged 2 commits into from
Feb 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/action/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,11 @@ pub enum ActionError {
"`{0}` exists with different content than planned, consider removing it with `rm {0}`"
)]
Exists(std::path::PathBuf),
#[error("`{0}` exists with a different uid ({1}) than planned ({2}), consider removing it with `rm {0}`")]
#[error("`{0}` exists with a different uid ({1}) than planned ({2}), consider updating it with `chown {2} {0}`")]
cole-h marked this conversation as resolved.
Show resolved Hide resolved
PathUserMismatch(std::path::PathBuf, u32, u32),
#[error("`{0}` exists with a different gid ({1}) than planned ({2}), consider removing it with `rm {0}`")]
#[error("`{0}` exists with a different gid ({1}) than planned ({2}), consider updating it with `chgrp {2} {0}`")]
cole-h marked this conversation as resolved.
Show resolved Hide resolved
PathGroupMismatch(std::path::PathBuf, u32, u32),
#[error("`{0}` exists with a different mode ({1:o}) than planned ({2:o}), consider removing it with `rm {0}`")]
#[error("`{0}` exists with a different mode ({1:o}) than planned ({2:o}), consider updating it with `chmod {2} {0}`")]
Hoverbear marked this conversation as resolved.
Show resolved Hide resolved
PathModeMismatch(std::path::PathBuf, u32, u32),
#[error("Getting metadata for {0}`")]
GettingMetadata(std::path::PathBuf, #[source] std::io::Error),
Expand Down