aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/suggests_command.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/command/suggests_command.rs')
-rw-r--r--crates/shirabe/src/command/suggests_command.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/shirabe/src/command/suggests_command.rs b/crates/shirabe/src/command/suggests_command.rs
index 5c021b2..b93f7ec 100644
--- a/crates/shirabe/src/command/suggests_command.rs
+++ b/crates/shirabe/src/command/suggests_command.rs
@@ -75,10 +75,11 @@ impl SuggestsCommand {
)?;
installed_repos.push(locked_repo.into());
} else {
- // TODO(phase-b): Config::get returns PhpMixed; need to coerce to IndexMap<String, PhpMixed>
- let _platform_cfg = composer.get_config().borrow().get("platform");
- let platform_overrides: IndexMap<String, PhpMixed> =
- todo!("extract IndexMap<String, PhpMixed> from PhpMixed config value");
+ let platform_cfg = composer.get_config().borrow().get("platform");
+ let platform_overrides: IndexMap<String, PhpMixed> = platform_cfg
+ .as_array()
+ .map(|m| m.iter().map(|(k, v)| (k.clone(), (**v).clone())).collect())
+ .unwrap_or_default();
installed_repos.push(RepositoryInterfaceHandle::new(PlatformRepository::new(
vec![],
platform_overrides,