Skip to content

Commit

Permalink
Merge pull request #288 from vicinus/master
Browse files Browse the repository at this point in the history
bugfix: test if virtualenv_version is defined
  • Loading branch information
Shiva Poudel committed Feb 17, 2016
2 parents b6449dd + eea99e3 commit b5854fc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions manifests/virtualenv.pp
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,13 @@
# --system-site-packages flag, default off for prior versions
# Prior to version 1.7 the default was equal to --system-site-packages
# and the flag --no-site-packages had to be passed to do the opposite
if (( versioncmp("${::virtualenv_version}",'1.7') > 0 ) and ( $systempkgs == true )) { # lint:ignore:only_variable_string
$_virtualenv_version = getvar('virtualenv_version') ? {
/.*/ => getvar('virtualenv_version'),
default => '',
}
if (( versioncmp($_virtualenv_version,'1.7') > 0 ) and ( $systempkgs == true )) {
$system_pkgs_flag = '--system-site-packages'
} elsif (( versioncmp("${::virtualenv_version}",'1.7') < 0 ) and ( $systempkgs == false )) { # lint:ignore:only_variable_string
} elsif (( versioncmp($_virtualenv_version,'1.7') < 0 ) and ( $systempkgs == false )) {
$system_pkgs_flag = '--no-site-packages'
} else {
$system_pkgs_flag = $systempkgs ? {
Expand Down

0 comments on commit b5854fc

Please sign in to comment.