Skip to content

Commit d60716b

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Use first index-url in pip.conf to derive pypi_host"
2 parents b620844 + 337e90c commit d60716b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ function network_sanity_check {
122122
echo "Performing network sanity check..."
123123
PIP_CONFIG_FILE=/etc/pip.conf
124124
if [[ -f $PIP_CONFIG_FILE ]]; then
125-
line=$(cat $PIP_CONFIG_FILE|grep index-url)
125+
line=$(cat $PIP_CONFIG_FILE|grep --max-count 1 index-url)
126126
pypi_url=${line#*=}
127127
pypi_host=$(echo $pypi_url|grep -Po '.*?//\K.*?(?=/)')
128128

0 commit comments

Comments
 (0)