From f2266d7070a3c6f1a07b7746448c647e3bc37b88 Mon Sep 17 00:00:00 2001 From: Jarl Stefansson Date: Thu, 2 Jan 2014 16:14:57 -0500 Subject: Fix bash logic false positives --- manifests/pip.pp | 6 +++--- manifests/virtualenv.pp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'manifests') diff --git a/manifests/pip.pp b/manifests/pip.pp index 5e287f7..5c218c5 100644 --- a/manifests/pip.pp +++ b/manifests/pip.pp @@ -96,7 +96,7 @@ define python::pip ( case $ensure { present: { exec { "pip_install_${name}": - command => "$pip_env wheel --help && pip wheel --version || wheel_support_flag='--no-use-wheel'; $pip_env --log ${cwd}/pip.log install $install_args \$wheel_support_flag ${proxy_flag} ${source}", + command => "$pip_env wheel --help && (pip wheel --version || wheel_support_flag='--no-use-wheel'); $pip_env --log ${cwd}/pip.log install $install_args \$wheel_support_flag ${proxy_flag} ${source}", unless => "$pip_env freeze | grep -i -e ${grep_regex}", user => $owner, environment => $environment, @@ -106,7 +106,7 @@ define python::pip ( latest: { exec { "pip_install_${name}": - command => "$pip_env wheel --help && pip wheel --version || wheel_support_flag='--no-use-wheel'; $pip_env --log ${cwd}/pip.log install --upgrade \$wheel_support_flag ${proxy_flag} ${source}", + command => "$pip_env wheel --help && (pip wheel --version || wheel_support_flag='--no-use-wheel'); $pip_env --log ${cwd}/pip.log install --upgrade \$wheel_support_flag ${proxy_flag} ${source}", user => $owner, environment => $environment, path => ["/usr/local/bin","/usr/bin","/bin", "/usr/sbin"], @@ -115,7 +115,7 @@ define python::pip ( latest: { exec { "pip_install_${name}": - command => "$pip_env wheel --help && pip wheel --version || wheel_support_flag='--no-use-wheel'; $pip_env --log ${cwd}/pip.log install -U $install_args \$wheel_support_flag ${proxy_flag} ${source}", + command => "$pip_env wheel --help && (pip wheel --version || wheel_support_flag='--no-use-wheel'); $pip_env --log ${cwd}/pip.log install -U $install_args \$wheel_support_flag ${proxy_flag} ${source}", user => $owner, environment => $environment, } diff --git a/manifests/virtualenv.pp b/manifests/virtualenv.pp index 94bbd15..9c9502d 100644 --- a/manifests/virtualenv.pp +++ b/manifests/virtualenv.pp @@ -127,7 +127,7 @@ define python::virtualenv ( # version, this makes sure we only use wheels if they are supported exec { "python_virtualenv_${venv_dir}": - command => "mkdir -p ${venv_dir} ${proxy_command} && virtualenv ${system_pkgs_flag} -p ${python} ${venv_dir} && ${venv_dir}/bin/pip $pip_env wheel --help && ${venv_dir}/bin/pip wheel --version || wheel_support_flag='--no-use-wheel'; ${venv_dir}/bin/pip --log ${venv_dir}/pip.log install ${pypi_index} ${proxy_flag} \$wheel_support_flag --upgrade pip ${distribute_pkg}", + command => "mkdir -p ${venv_dir} ${proxy_command} && virtualenv ${system_pkgs_flag} -p ${python} ${venv_dir} && ${venv_dir}/bin/pip $pip_env wheel --help && (${venv_dir}/bin/pip wheel --version || wheel_support_flag='--no-use-wheel'); ${venv_dir}/bin/pip --log ${venv_dir}/pip.log install ${pypi_index} ${proxy_flag} \$wheel_support_flag --upgrade pip ${distribute_pkg}", user => $owner, path => $path, cwd => "/tmp", -- cgit v1.2.3