MCPcopy Create free account
hub / github.com/archlinux/alpm / run_command

Function run_command

dev-scripts/src/main.rs:26–45  ·  view source on GitHub ↗

Runs a command of the `dev-scripts` executable.

()

Source from the content-addressed store, hash-verified

24
25/// Runs a command of the `dev-scripts` executable.
26fn run_command() -> Result<(), Error> {
27 let cli = Cli::parse();
28 SimpleLogger::init(cli.verbose.log_level_filter(), Config::default())?;
29
30 match cli.cmd {
31 cli::Command::TestFiles { cmd, cache_dir } => {
32 let cache_dir = if let Some(path) = cache_dir {
33 CacheDir::from(path)
34 } else {
35 CacheDir::from_xdg()?
36 };
37
38 test_files(cmd, cache_dir)
39 }
40 cli::Command::CompareSrcinfo {
41 pkgbuild_path,
42 srcinfo_path,
43 } => compare_source_info(pkgbuild_path, srcinfo_path),
44 }
45}
46
47fn main() -> ExitCode {
48 if let Err(error) = run_command() {

Callers 1

mainFunction · 0.85

Calls 4

test_filesFunction · 0.85
compare_source_infoFunction · 0.85
parseFunction · 0.50
initFunction · 0.50

Tested by

no test coverage detected