Browse Source

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
changes/32/527532/1
Jeremy Stanley 1 year ago
parent
commit
22284188fb
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      manifests/init.pp

+ 1
- 1
manifests/init.pp View File

@@ -50,7 +50,7 @@ class subunit2sql (
50 50
     # deps we've preinstalled from system packages because they lack wheels on
51 51
     # PyPI and must be otherwise rebuilt from sdist instead (specifically
52 52
     # netifaces).
53
-    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\')"',
53
+    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\')\\""',
54 54
     require => [
55 55
       Class['pip'],
56 56
       Package['python-mysqldb'],

Loading…
Cancel
Save