aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-07-04 19:49:26 +0900
committernsfisis <nsfisis@gmail.com>2026-07-04 19:49:26 +0900
commit6683d321cc73a7730a99b7012353481e3abd316f (patch)
tree4929f2bc9db84712e9288c4ab580524edd060857 /crates
parent3ff81cbade26a5de4e67076854e59b16a270140b (diff)
downloadphp-shirabe-6683d321cc73a7730a99b7012353481e3abd316f.tar.gz
php-shirabe-6683d321cc73a7730a99b7012353481e3abd316f.tar.zst
php-shirabe-6683d321cc73a7730a99b7012353481e3abd316f.zip
fix(search-command): use as_list() to read variadic tokens argument
ArgvInput stores variadic arguments as PhpMixed::List, not PhpMixed::Array, so as_array() always returned None and the search query was silently empty, causing packagist to reject every request with a 400 Bad Request.
Diffstat (limited to 'crates')
-rw-r--r--crates/shirabe/src/command/search_command.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/shirabe/src/command/search_command.rs b/crates/shirabe/src/command/search_command.rs
index 3e85d78..89abddd 100644
--- a/crates/shirabe/src/command/search_command.rs
+++ b/crates/shirabe/src/command/search_command.rs
@@ -202,9 +202,9 @@ impl Command for SearchCommand {
let tokens_arg = input.borrow().get_argument("tokens")?;
let token_strings: Vec<String> = tokens_arg
- .as_array()
- .map(|arr| {
- arr.values()
+ .as_list()
+ .map(|list| {
+ list.iter()
.filter_map(|v| v.as_string().map(|s| s.to_string()))
.collect()
})