Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Revert "Set posix=False when parsing environment variables (#578)" #584

Merged
merged 1 commit into from
Nov 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions catkin_tools/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
try:
_cmd_split(u'\u00E9')

def cmd_split(s, *args, **kwargs):
return _cmd_split(s.decode('utf-8'), *args, **kwargs)
def cmd_split(s):
return _cmd_split(s.decode('utf-8'))
except UnicodeEncodeError:
cmd_split = _cmd_split

Expand Down Expand Up @@ -688,9 +688,7 @@ def parse_env_str(environ_str):
"""

try:
# Use cmd_split with posix=False because posix mode is problematic when an
# environment variable is set to specific bash dollar-sign strings (e.g. $'\'\n')
split_envs = [e.split('=', 1) for e in cmd_split(environ_str, posix=False)]
split_envs = [e.split('=', 1) for e in cmd_split(environ_str)]
return {
e[0]: e[1] for e
in split_envs
Expand Down