[platform] launcher: more robust product-info.json lookup (IJPL-172055)

GitOrigin-RevId: f02bc438b9e19d651a5a838c218431e566818895
This commit is contained in:
Roman Shevchenko
2025-05-16 19:46:03 +02:00
committed by intellij-monorepo-bot
parent 1e53506082
commit 3536a64f52

View File

@@ -418,7 +418,10 @@ fn find_ide_home(current_exe: &Path) -> Result<(PathBuf, PathBuf)> {
fn traverse_parents(mut candidate: PathBuf) -> Result<Option<(PathBuf, PathBuf)>> {
for _ in 0..IDE_HOME_LOOKUP_DEPTH {
candidate = candidate.parent_or_err()?;
candidate = match candidate.parent() {
Some(parent) => parent.to_path_buf(),
None => { break; }
};
debug!("Probing for IDE home: {:?}", candidate);
let product_info_path = candidate.join(PRODUCT_INFO_REL_PATH);
if product_info_path.is_file() {