File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,12 @@ choose_ip_address() {
144
144
header " $prompt "
145
145
echo " $help_text "
146
146
147
+ if [ ${# ip_array[@]} -eq 0 ]; then
148
+ echo " $( red " No IP addresses found." ) "
149
+ echo " $( red " Please check your network configuration." ) "
150
+ exit 1
151
+ fi
152
+
147
153
if [ ${# ip_array[@]} -eq 1 ]; then
148
154
local chosen_ip=" ${ip_array[0]} "
149
155
echo -e " $( green " Only one IP address available:" ) $( cyan " $chosen_ip " ) \n"
@@ -214,7 +220,7 @@ get_user_credentials() {
214
220
echo -e " \n$( green " Credentials saved successfully." ) "
215
221
}
216
222
217
- IP_LIST=$( /tmp/ptah-agent list-ips)
223
+ IP_LIST=" $( /tmp/ptah-agent list-ips | tr -d ' \n ' ) "
218
224
choose_ip_address " $IP_LIST " " Advertised IP addresses" " ADVERTISE_ADDR" " $ADVERTISED_IP_HELP "
219
225
choose_ip_address " $IP_LIST " " Public IP address" " PUBLIC_IP" " $PUBLIC_IP_HELP "
220
226
You can’t perform that action at this time.
0 commit comments