vdev/commands/config/set/repo.rs
1use anyhow::Result;
2use clap::Args;
3
4use crate::{app, config, platform};
5
6/// Set the path to the Vector repository
7#[derive(Args, Debug)]
8#[command()]
9pub struct Cli {
10 path: String,
11}
12
13impl Cli {
14 pub fn exec(self) -> Result<()> {
15 let path = platform::canonicalize_path(self.path);
16
17 let mut config = app::config().clone();
18 config.repo = path;
19 config::save(config)?;
20
21 Ok(())
22 }
23}