Skip to content

Commit cbaed36

Browse files
committed
Search index when staying at the latest version
1 parent ff157aa commit cbaed36

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

manifests/pip.pp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@
125125
default => "--index-url=${index}",
126126
}
127127

128+
$pypi_search_index = $index ? {
129+
false => '',
130+
default => "--index=${index}",
131+
}
132+
128133
$proxy_flag = $proxy ? {
129134
false => '',
130135
default => "--proxy=${proxy}",
@@ -242,7 +247,7 @@
242247
# Latest version.
243248
exec { "pip_install_${name}":
244249
command => "${pip_env} wheel --help > /dev/null 2>&1 && { ${pip_env} wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; { ${pip_env} --log ${log}/pip.log install --upgrade \$wheel_support_flag ${pypi_index} ${proxy_flag} ${install_args} ${install_editable} ${source} || ${pip_env} --log ${log}/pip.log install --upgrade ${pypi_index} ${proxy_flag} ${install_args} ${install_editable} ${source} ;}",
245-
unless => "${pip_env} search ${proxy_flag} ${source} | grep -i INSTALLED.*latest",
250+
unless => "${pip_env} search ${pypi_search_index} ${proxy_flag} ${source} | grep -i INSTALLED.*latest",
246251
user => $owner,
247252
group => $group,
248253
cwd => $cwd,

0 commit comments

Comments
 (0)