Fix: Missed ssh keys when target is symlink

This commit is contained in:
mrjk 2022-05-31 01:30:12 -04:00
parent 40401b8702
commit b469e0c425

View File

@ -401,11 +401,11 @@ idm_ssh_search_private_keys ()
pub_keys=$( pub_keys=$(
{ {
# Compat mode # Compat mode
find ~/.ssh/$id -maxdepth $maxdepth -name "${id}_*" -name '*pub' -name "*$id*" | sort find -L ~/.ssh/$id -maxdepth $maxdepth -name "${id}_*" -name '*pub' -name "*$id*" | sort
} | sort | uniq } | sort | uniq
) )
else else
pub_keys=$(find ~/.ssh/$id -maxdepth $maxdepth -name '*pub' | sort) pub_keys=$(find -L ~/.ssh/$id -maxdepth $maxdepth -name '*pub' | sort)
fi fi
# Get list of key # Get list of key