ic-query-cli 0.55.5

Command-line wrapper for read-only Internet Computer metadata queries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Module: sns::commands::run::common
//!
//! Responsibility: provide shared runtime helpers for SNS command execution.
//! Does not own: command specs, report building, or cache policy.
//! Boundary: maps cache-root failures into SNS command errors.

use crate::{sns::commands::SnsCommandError, storage::cache_root};
use std::path::PathBuf;

pub(super) fn command_cache_root() -> Result<PathBuf, SnsCommandError> {
    cache_root().map_err(|err| SnsCommandError::Usage(err.to_string()))
}