MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / status

Function status

src/cli/setup.rs:105–162  ·  view source on GitHub ↗
(modes: &[RunnerMode])

Source from the content-addressed store, hash-verified

103}
104
105pub fn status(modes: &[RunnerMode]) -> Result<()> {
106 let system_info = SystemInfo::new()?;
107 info!("{}", style("Tools").bold());
108 for executor in get_executors_from_modes(modes) {
109 // Don't probe for tooling that can't be used on this OS anyway.
110 if executor.support_level(&system_info) == ExecutorSupport::Unsupported {
111 continue;
112 }
113 match executor.tool_status() {
114 Some(tool_status) => match &tool_status.status {
115 ToolInstallStatus::Installed { version } => {
116 info!(
117 " {} {} executor: {} ({})",
118 check_mark(),
119 executor.name(),
120 tool_status.tool_name,
121 version
122 );
123 match executor.privilege_status() {
124 Some(PrivilegeStatus::Satisfied { detail }) => {
125 info!(" {} privileges: {}", check_mark(), detail);
126 }
127 Some(PrivilegeStatus::Missing { message }) => {
128 info!(" {} privileges: {}", cross_mark(), message);
129 }
130 None => {}
131 }
132 }
133 ToolInstallStatus::IncorrectVersion { version, message } => {
134 info!(
135 " {} {} executor: {} ({}, {})",
136 warn_mark(),
137 executor.name(),
138 tool_status.tool_name,
139 version,
140 message
141 );
142 }
143 ToolInstallStatus::NotInstalled => {
144 info!(
145 " {} {} executor: {} (not installed)",
146 cross_mark(),
147 executor.name(),
148 tool_status.tool_name
149 );
150 }
151 },
152 None => {
153 info!(
154 " {} {} executor: No tool to install",
155 check_mark(),
156 executor.name()
157 );
158 }
159 }
160 }
161 Ok(())
162}

Callers 1

runFunction · 0.70

Calls 4

get_executors_from_modesFunction · 0.85
support_levelMethod · 0.45
tool_statusMethod · 0.45
privilege_statusMethod · 0.45

Tested by

no test coverage detected