fix(build.func): expand glob in SSH key "Scan Folder/Glob" so it can find keys (#15873)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Sam Heinz <sam@samheinz.com>
This commit is contained in:
TowyTowy
2026-07-19 19:01:41 +02:00
committed by GitHub
parent d81c9f3ed2
commit e1ce55b547
+3 -3
View File
@@ -3600,9 +3600,9 @@ configure_ssh_settings() {
glob_path=$(whiptail --backtitle "$backtitle" \
--inputbox "Enter a folder or glob to scan (e.g. /root/.ssh/*.pub)" 10 72 --title "Scan Folder/Glob" 3>&1 1>&2 2>&3)
if [[ -n "$glob_path" ]]; then
shopt -s nullglob
read -r -a _scan_files <<<"$glob_path"
shopt -u nullglob
[[ -d "$glob_path" ]] && glob_path="${glob_path%/}/*"
local -a _scan_files
mapfile -t _scan_files < <(compgen -G "$glob_path")
if [[ "${#_scan_files[@]}" -gt 0 ]]; then
ssh_build_choices_from_files "${_scan_files[@]}"
if [[ "$COUNT" -gt 0 ]]; then