Skip to main content

canic_host/install_root/
options.rs

1use crate::{canister_build::CanisterBuildProfile, deployment_truth::DeploymentPlanV1};
2use std::path::PathBuf;
3
4///
5/// InstallRootOptions
6///
7
8#[derive(Clone, Debug)]
9pub struct InstallRootOptions {
10    pub root_canister: String,
11    pub root_build_target: String,
12    pub environment: String,
13    pub fleet_name: String,
14    pub icp_root: Option<PathBuf>,
15    pub build_profile: Option<CanisterBuildProfile>,
16    pub config_path: Option<String>,
17    pub expected_app: Option<String>,
18    pub interactive_config_selection: bool,
19    pub deployment_plan_override: Option<DeploymentPlanV1>,
20}
21
22impl InstallRootOptions {
23    /// Return the exact ICP artifact environment owned by this install mode.
24    pub(super) fn artifact_environment(&self) -> &str {
25        if self.deployment_plan_override.is_some() {
26            &self.environment
27        } else {
28            "local"
29        }
30    }
31}