mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-07-20 12:55:08 +02:00
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:
+3
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user