swarm repositories / source
aboutsummaryrefslogtreecommitdiff
path: root/crates/fidget-spinner-cli/src/mcp/host/config.rs
blob: 8d1ee4b5aba3d128b0e9c3926eea0317bbf7fee6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::path::PathBuf;

use fidget_spinner_store_sqlite::StoreError;

#[derive(Clone, Debug)]
pub(super) struct HostConfig {
    pub(super) executable: PathBuf,
    pub(super) initial_project: Option<PathBuf>,
}

impl HostConfig {
    pub(super) fn new(initial_project: Option<PathBuf>) -> Result<Self, StoreError> {
        Ok(Self {
            executable: std::env::current_exe()?,
            initial_project,
        })
    }
}