fn check_uuid(
    wrapper: &TextWrapper,
    xcode_version: (u32, u32),
    checkout: &Path,
    xcode_app_dir: &Path,
) -> Result<bool, Error> {
    let info_path = xcode_app_dir.join("Info");
    let uuid = bossy::Command::impure("defaults")
        .with_arg("read")
        .with_arg(info_path)
        .with_arg("DVTPlugInCompatibilityUUID")
        .run_and_wait_for_str(|s| s.trim().to_owned())
        .map_err(Error::UuidLookupFailed)?;
    let plist_path = checkout.join("Plug-ins/Rust.ideplugin/Contents/Info.plist");
    let plist = fs::read_to_string(&plist_path).map_err(|cause| Error::PlistReadFailed {
        path: plist_path,
        cause,
    })?;
    if !plist.contains(&uuid) {
        Report::action_request(
            format!(
                "Your Xcode UUID ({}, version {}.{}) isn't supported by `rust-xcode-plugin`; skipping installation",
                uuid, xcode_version.0, xcode_version.1,
            ),
            "You won't be able to set breakpoints in Xcode until this is resolved! Please open an issue at https://github.com/BrainiumLLC/rust-xcode-plugin",
        ).print(&wrapper);
        Ok(false)
    } else {
        Ok(true)
    }
}
// Step 2: check if uuid is supported, and prompt user to open issue if not
Step 2: check if uuid is supported, and prompt user to open issue if not
Step 2 : check if uuid is supported and prompt user to open issue if not
fn check_uuid(
    wrapper: &TextWrapper,
    xcode_version: (u32, u32),
    checkout: &Path,
    xcode_app_dir: &Path,
) -> Result<bool, Error> {
    let info_path = xcode_app_dir.join("Info");
    let uuid = bossy::Command::impure("defaults")
        .with_arg("read")
        .with_arg(info_path)
        .with_arg("DVTPlugInCompatibilityUUID")
        .run_and_wait_for_str(|s| s.trim().to_owned())
        .map_err(Error::UuidLookupFailed)?;
    let plist_path = checkout.join("Plug-ins/Rust.ideplugin/Contents/Info.plist");
    let plist = fs::read_to_string(&plist_path).map_err(|cause| Error::PlistReadFailed {
        path: plist_path,
        cause,
    })?;
    if !plist.contains(&uuid) {
        Report::action_request(
            format!(
                "Your Xcode UUID ({}, version {}.{}) isn't supported by `rust-xcode-plugin`; skipping installation",
                uuid, xcode_version.0, xcode_version.1,
            ),
            "You won't be able to set breakpoints in Xcode until this is resolved! Please open an issue at https://github.com/BrainiumLLC/rust-xcode-plugin",
        ).print(&wrapper);
        Ok(false)
    } else {
        Ok(true)
    }
}
fn check_uuid ( wrapper : & TextWrapper , xcode_version : ( u32 , u32 ) , checkout : & Path , xcode_app_dir : & Path , ) -> Result < bool , Error > { let info_path = xcode_app_dir . join ( " " ) ; let uuid = bossy :: Command :: impure ( " " ) . with_arg ( " " ) . with_arg ( info_path ) . with_arg ( " " ) . run_and_wait_for_str ( | s | s . trim ( ) . to_owned ( ) ) . map_err ( Error :: UuidLookupFailed ) ? ; let plist_path = checkout . join ( " " ) ; let plist = fs :: read_to_string ( & plist_path ) . map_err ( | cause | Error :: PlistReadFailed { path : plist_path , cause , } ) ? ; if ! plist . contains ( & uuid ) { Report :: action_request ( format ! ( " " uuid xcode_version 0 xcode_version 1 ) , " " , ) . print ( & wrapper ) ; Ok ( false ) } else { Ok ( true ) } }
Step 2: check if uuid is supported, and prompt user to open issue if not
Step 2 : check if uuid is supported and prompt user to open issue if not
wrapper
&TextWrapper
xcode_version
(u32, u32)
checkout
&Path
xcode_app_dir
&Path