From 8766b9dbc981c827d49658b7bc79d860031c0493 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 20 Jul 2026 05:58:29 +0900 Subject: fix(update-command): un-ignore test_interactive_tmp via assoc select choices PHP's UpdateCommand::getPackagesInteractively passes $autocompleterValues keyed by package name to $io->select, so the selection resolves to package names. The port passed only the keys as a list, making select resolve to a numeric index that the update then treated as an unknown package. The old ignore reason (non-interactive terminal error) no longer applied. Co-Authored-By: Claude Fable 5 --- crates/shirabe/src/command/update_command.rs | 6 +++--- crates/shirabe/tests/command/update_command_test.rs | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/shirabe/src/command/update_command.rs b/crates/shirabe/src/command/update_command.rs index a20d288f..d6c20b45 100644 --- a/crates/shirabe/src/command/update_command.rs +++ b/crates/shirabe/src/command/update_command.rs @@ -705,10 +705,10 @@ impl UpdateCommand { let select_result = io.select( "Select packages: (Select more than one value separated by comma) ".to_string(), - PhpMixed::List( + PhpMixed::Array( autocompleter_values - .keys() - .map(|k| PhpMixed::String(k.clone())) + .iter() + .map(|(k, v)| (k.clone(), PhpMixed::String(v.clone()))) .collect(), ), PhpMixed::Bool(false), diff --git a/crates/shirabe/tests/command/update_command_test.rs b/crates/shirabe/tests/command/update_command_test.rs index ed17d80e..2fc20269 100644 --- a/crates/shirabe/tests/command/update_command_test.rs +++ b/crates/shirabe/tests/command/update_command_test.rs @@ -440,7 +440,6 @@ Package operations: 0 installs, 1 update, 0 removals #[test] #[serial] -#[ignore = "interactive selection path unported: --interactive requires a TTY and errors with \"--interactive cannot be used in non-interactive terminals.\""] fn test_interactive_tmp() { for (package_names, expected) in provide_interactive_updates() { let composer_json = serde_json::json!({ -- cgit v1.3.1