From 8d9e7ae43f1dbdd0d7ef8ba11a3637b26a22a492 Mon Sep 17 00:00:00 2001 From: rootiest Date: Mon, 18 May 2026 22:29:50 -0400 Subject: [PATCH] fix(deps): validate method choice is numeric before comparing --- functions/_fish_deps_install.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/_fish_deps_install.fish b/functions/_fish_deps_install.fish index c3e07c7..f32fa0a 100644 --- a/functions/_fish_deps_install.fish +++ b/functions/_fish_deps_install.fish @@ -101,7 +101,7 @@ function _fish_deps_install set m (math $m + 1) end read -l -P " Choose [1-"(count $methods)"] (default 1 = $method_labels[1]): " _choice - if test -n "$_choice"; and test "$_choice" -ge 1; and test "$_choice" -le (count $methods) + if string match -qr '^\d+$' "$_choice"; and test "$_choice" -ge 1; and test "$_choice" -le (count $methods) set chosen_method $methods[$_choice] end else