Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support IPv6 address when using --extra-files #247

Closed
wants to merge 1 commit into from

Conversation

ConnorBaker
Copy link

@ConnorBaker ConnorBaker commented Nov 8, 2023

Fixes #246.

I successfully deployed to an IPv4 and IPv6 host, so it doesn't break anything and it does fix the linked issue.

@ConnorBaker
Copy link
Author

@Mic92 would you have an opportunity to review this?

@@ -447,11 +447,21 @@ if [[ -n ${extra_files-} ]]; then
if [[ -d $extra_files ]]; then
extra_files="$extra_files/"
fi
# If `ssh_host` is an IPv6 address, we need to wrap it in brackets.
if [[ $ssh_host =~ ^[0-9a-fA-F:]+$ ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This regex could result in quite a few false positives IMO.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if you name your machine: caffeebabe

Copy link
Member

@phaer phaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this is needed? I think rsync supports square brackets around ipv4 addresses and hostnames as well for exactly this reason and quick testing seems to support that hypothesis, so i.e.:

rsync_destination="root@[${ssh_host}]:/mnt/"

should work the same?

@Mic92
Copy link
Member

Mic92 commented Dec 7, 2023

Lack of response. Please re-open if you plan to continue working on this.

@Mic92 Mic92 closed this Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copying extra files fails when using IPv6 address
3 participants