xbp 10.15.4

XBP is a zero-config build pack that can also interact with proxies, kafka, sockets, synthetic monitors.
Documentation
use std::path::PathBuf;

/// Shared context passed into CLI handlers.
#[derive(Debug, Clone)]
pub struct AppContext {
    debug: bool,
    working_dir: PathBuf,
}

impl AppContext {
    pub fn new(debug: bool) -> Self {
        let working_dir = std::env::current_dir().unwrap_or_else(|_| PathBuf::from("."));
        Self { debug, working_dir }
    }

    pub fn debug(&self) -> bool {
        self.debug
    }

    pub fn working_dir(&self) -> &PathBuf {
        &self.working_dir
    }
}