Skip to content

Commit

Permalink
Merge pull request WoozyMasta#30 from achurak/master
Browse files Browse the repository at this point in the history
fix: the sed regex to match the hyphen in git_remote_url
  • Loading branch information
WoozyMasta authored Feb 10, 2022
2 parents d11146f + c0c94ab commit 2da4dcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kube-dump
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ if [ "$git_push" == 'true' ] && [ ! -d "$destination_dir/.git/" ]; then

if ! grep --quiet --extended-regexp 'https?:\/\/' <<< "$git_remote_url"; then

_remote_url=$(sed -r 's|.*@([A-Za-z0-9\-\.]+):.*|\1|' <<< "$git_remote_url")
_remote_url=$(sed -r 's|.*@([A-Za-z0-9\.-]+):.*|\1|' <<< "$git_remote_url")
! grep --quiet "^$_remote_url " ~/.ssh/known_hosts >/dev/null 2>&1 && \
ssh-keyscan "$_remote_url" >> ~/.ssh/known_hosts 2>/dev/null

Expand Down

0 comments on commit 2da4dcd

Please sign in to comment.