MCPcopy Create free account
hub / github.com/PowerShell/DSC / main

Function main

resources/process/src/main.rs:44–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42}
43
44fn main() {
45 let args: Vec<String> = env::args().collect();
46 if args.len() == 2 {
47 // one argument passed
48 match args[1].as_str() {
49 "list" => {
50 for p in get_task_list()
51 {
52 let json = serde_json::to_string(&p).unwrap();
53 println!("{json}");
54 }
55 exit(0);
56 },
57 "get" | "set" | "test" => { // used for testing only
58 print_input();
59 exit(0);
60 },
61 _ => {
62 help();
63 exit(1);
64 },
65 }
66 }
67 else {
68 help();
69 exit(1);
70 }
71}

Callers

nothing calls this directly

Calls 5

get_task_listFunction · 0.85
print_inputFunction · 0.85
helpFunction · 0.85
as_strMethod · 0.80
to_stringFunction · 0.50

Tested by

no test coverage detected