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

Function parse_input_arg

resources/windows_firewall/src/main.rs:128–141  ·  view source on GitHub ↗
(args: &[String])

Source from the content-addressed store, hash-verified

126}
127
128fn parse_input_arg(args: &[String]) -> Option<String> {
129 let mut index = 2;
130 while index < args.len() {
131 if args[index] == "--input" || args[index] == "-i" {
132 if index + 1 < args.len() {
133 return Some(args[index + 1].clone());
134 }
135 write_error(&t!("main.missingInputValue"));
136 exit(EXIT_INVALID_ARGS);
137 }
138 index += 1;
139 }
140 None
141}

Callers 1

mainFunction · 0.70

Calls 1

write_errorFunction · 0.70

Tested by

no test coverage detected