MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / launch_agent_environment_xml

Function launch_agent_environment_xml

packages/server/src/service.rs:692–713  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

690}
691
692fn launch_agent_environment_xml() -> String {
693 [
694 "ANDROID_HOME",
695 "ANDROID_SDK_ROOT",
696 "JAVA_HOME",
697 "DEVELOPER_DIR",
698 ]
699 .into_iter()
700 .filter_map(|key| {
701 let value = env::var(key).ok()?;
702 if value.trim().is_empty() {
703 return None;
704 }
705 Some(format!(
706 " <key>{}</key>\n <string>{}</string>",
707 xml_escape(key),
708 xml_escape(&value)
709 ))
710 })
711 .collect::<Vec<_>>()
712 .join("\n")
713}
714
715fn xml_escape(value: &str) -> String {
716 value

Callers 1

plist_contentsFunction · 0.85

Calls 1

is_emptyMethod · 0.80

Tested by

no test coverage detected