Skip to content

Commit

Permalink
fix(cargo-mobile doctor): Use the correct path for detecting the sdk (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk authored Sep 25, 2024
1 parent 3712eb3 commit b04e3d5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/android/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ use crate::{
os::Env as CoreEnv,
util::cli::{Report, Reportable},
};
use std::{
collections::HashMap,
ffi::OsString,
path::{Path, PathBuf},
};
use std::{collections::HashMap, ffi::OsString, path::PathBuf};
use thiserror::Error;

#[derive(Debug, Error)]
Expand Down Expand Up @@ -110,7 +106,7 @@ impl Env {
}

pub fn sdk_version(&self) -> Result<source_props::Revision, source_props::Error> {
SourceProps::from_path(Path::new(self.android_home()).join("tools/source.properties"))
SourceProps::from_path(self.platform_tools_path().join("source.properties"))
.map(|props| props.pkg.revision)
}
}
Expand Down

0 comments on commit b04e3d5

Please sign in to comment.