Skip to content

Commit

Permalink
Put environment variables in quotes to handle multiple discovery servers
Browse files Browse the repository at this point in the history
  • Loading branch information
hilary-luo committed Apr 2, 2024
1 parent fa00d6d commit 0ffb6a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions turtlebot4_setup/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,12 @@ def write_bash(self):
v = ''
for i, line in enumerate(bash):
if f'export {k}' in line:
bash[i] = f'export {k}={v}\n'
bash[i] = f'export {k}=\"{v}\"\n'
found = True

# If the setting is missing from the setup.bash, add it to the beginning
if not found:
bash.insert(0,f'export {k}={v}\n')
bash.insert(0,f'export {k}=\"{v}\"\n')

with open('/tmp' + self.setup_bash_file, 'w') as f:
f.writelines(bash)
Expand Down

0 comments on commit 0ffb6a7

Please sign in to comment.