INNER CODE UNIT · Rust

config_path

rustic-rs/rustic · src/commands.rs:218

    fn config_path(&self) -> Option<PathBuf> {
        // Actually abscissa itself reads a config from `config_path`, but I have now returned None,
        // i.e. no config is read.
        None
    }

    /// Apply changes to the config after it's been loaded, e.g. overriding
    /// values in a config file using command-line options.
    fn process_config(&self, _config: RusticConfig) -> Result<RusticConfig, FrameworkError> {
        // Note: The config that is "not read" is then read here in `process_config()` by the
        // rustic logic and merged with the CLI options.
        // That's why it says `_config`, because it's not read at all and therefore not needed.
        let mut config = self.config.clone();

        // Completion generation only needs the command definition. In particular, it must not
        // try to read a profile which may be inaccessible to the user generating completions.
        if matches!(self.commands, RusticCmd::Completions(_)) {
            return Ok(config);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…