graftfs 0.2.0

A Rust implementation of the GNU stow utility for managing dotfiles. It is a symlink farm manager that takes separate packages of software and/or data and makes them appear to be installed in the same place. Features include stow, delete, and restow operations, simulation mode, directory folding, and regex-based ignore/override patterns.
/*
 * graftfs
 * Copyright (C) 2026 Chris Tisdale
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

use std::fmt::Debug;
use thiserror::Error;

#[derive(Error, Debug)]
#[non_exhaustive]
pub enum CliError {
    #[error(transparent)]
    LoggingError(#[from] crate::config::LoggingError),
    #[error(transparent)]
    InvalidPath(#[from] std::io::Error),
    #[error(transparent)]
    CommandLineParsingError(#[from] clap::Error),
    #[error(transparent)]
    MatchingError(#[from] clap::parser::MatchesError),
    #[error(transparent)]
    InvalidConfigFile(#[from] crate::config::ConfigError),
    #[error(transparent)]
    CommandError(#[from] crate::commands::CommandError),
    #[error("Invalid target directory.  The target directory must exist and be a directory.")]
    InvalidTargetDirectory,
    #[error(transparent)]
    StripPrefixError(#[from] std::path::StripPrefixError),
    #[error("Invalid configuration file: {0}")]
    InvalidConfigurationFile(String),
    #[error(transparent)]
    CommandBuildError(#[from] crate::commands::CommandBuildError),
    #[error(transparent)]
    ResolveError(#[from] crate::config::ResolveError),
}