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

Function status

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

Source from the content-addressed store, hash-verified

134}
135
136pub fn status(modes: &[RunnerMode]) -> Result<()> {
137 let system_info = SystemInfo::new()?;
138 info!("{}", style("Tools").bold());
139 for executor in get_executors_from_modes(modes) {
140 // Don't probe for tooling that can't be used on this OS anyway.
141 if executor.support_level(&system_info) == ExecutorSupport::Unsupported {
142 continue;
143 }
144 let installed = match executor.tool_status() {
145 Some(tool_status) => match &tool_status.status {
146 ToolInstallStatus::Installed { version } => {
147 info!(
148 " {} {} executor: {} ({})",
149 check_mark(),
150 executor.name(),
151 tool_status.tool_name,
152 version
153 );
154 true
155 }
156 ToolInstallStatus::IncorrectVersion { version, message } => {
157 info!(
158 " {} {} executor: {} ({}, {})",
159 warn_mark(),
160 executor.name(),
161 tool_status.tool_name,
162 version,
163 message
164 );
165 false
166 }
167 ToolInstallStatus::NotInstalled => {
168 info!(
169 " {} {} executor: {} (not installed)",
170 cross_mark(),
171 executor.name(),
172 tool_status.tool_name
173 );
174 false
175 }
176 },
177 None => {
178 info!(
179 " {} {} executor: No tool to install",
180 check_mark(),
181 executor.name()
182 );
183 true
184 }
185 };
186
187 if installed {
188 match executor.privilege_status() {
189 Some(PrivilegeStatus::Satisfied { detail }) => {
190 info!(" {} privileges: {}", check_mark(), detail);
191 }
192 Some(PrivilegeStatus::Missing { message }) => {
193 info!(" {} privileges: {}", cross_mark(), message);

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