Skip to content

Commit

Permalink
Only split values outside of single quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
dmyerscough committed Apr 1, 2015
1 parent f70f462 commit ce198a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion salt/modules/nginx.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import salt.utils
import salt.utils.decorators as decorators

import re


# Cache the output of running which('nginx') so this module
# doesn't needlessly walk $PATH looking for the same binary
Expand Down Expand Up @@ -60,7 +62,7 @@ def build_info():

for i in out.splitlines():
if i.startswith('configure argument'):
ret['build arguments'] = i.split()[2:]
ret['build arguments'] = re.findall(r"(?:[^\s]*'.*')|(?:[^\s]+)", i)[2:]
continue

ret['info'].append(i)
Expand Down

0 comments on commit ce198a4

Please sign in to comment.