Quote arguments to the test command

When testing to see whether the installed subunit2sql package
matches the version available on PyPI, the first argument can be
empty if the package has not yet been installed. Make sure these
arguments are quoted so that the test command gets a syntax it can
parse (rather than a string starting with a binary operator).

Change-Id: Ia2e7165f851085328e00431a739cce17d2e494b2
This commit is contained in:
Jeremy Stanley 2017-12-12 22:01:32 +00:00
parent e02cfe94a3
commit 22284188fb
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ class subunit2sql (
# deps we've preinstalled from system packages because they lack wheels on
# PyPI and must be otherwise rebuilt from sdist instead (specifically
# netifaces).
onlyif => '/bin/bash -c "test $(pip list --format columns | sed -ne \'s/^subunit2sql\s\+\(.*\)$/\1/p\') != $(pip search \'subunit2sql$\' | sed -ne \'s/^subunit2sql (\(.*\)).*$/\1/p\')"',
onlyif => '/bin/bash -c "test \\"$(pip list --format columns | sed -ne \'s/^subunit2sql\s\+\(.*\)$/\1/p\')\\" != \\"$(pip search \'subunit2sql$\' | sed -ne \'s/^subunit2sql (\(.*\)).*$/\1/p\')\\""',
require => [
Class['pip'],
Package['python-mysqldb'],