sbom-tools 0.1.19

Semantic SBOM diff and analysis tool
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! CLI handler for the `watch` subcommand.

use crate::config::WatchConfig;
use crate::watch::WatchError;
use anyhow::Result;

/// Run the watch command with the given configuration.
pub fn run_watch(config: WatchConfig) -> Result<()> {
    // Validate that all watch directories exist
    for dir in &config.watch_dirs {
        if !dir.is_dir() {
            return Err(WatchError::DirNotFound(dir.clone()).into());
        }
    }

    crate::watch::run_watch_loop(&config)
}