Skip to content

Commit

Permalink
fix: user provided public address is being overridden (#5462)
Browse files Browse the repository at this point in the history
  • Loading branch information
emosbaugh authored Nov 8, 2024
1 parent fc47898 commit 0370263
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/common/discover.sh
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,14 @@ function discover_public_ip() {
fi

# ec2
PUBLIC_ADDRESS=$(discover_public_ip_ec2_imdsv2)
if [ -n "$PUBLIC_ADDRESS" ]; then
_out=$(discover_public_ip_ec2_imdsv2)
if [ -n "$_out" ]; then
PUBLIC_ADDRESS=$_out
return
fi
PUBLIC_ADDRESS=$(discover_public_ip_ec2_imdsv1)
if [ -n "$PUBLIC_ADDRESS" ]; then
_out=$(discover_public_ip_ec2_imdsv1)
if [ -n "$_out" ]; then
PUBLIC_ADDRESS=$_out
return
fi

Expand Down

0 comments on commit 0370263

Please sign in to comment.