pw_env_setup: fix quotes in output
Change-Id: If670b8e2d8c330b58b6b72c8bfcda1e70dcba659
diff --git a/pw_env_setup/py/pw_env_setup/env_setup.py b/pw_env_setup/py/pw_env_setup/env_setup.py
index b425b08..6fb7243 100755
--- a/pw_env_setup/py/pw_env_setup/env_setup.py
+++ b/pw_env_setup/py/pw_env_setup/env_setup.py
@@ -256,10 +256,14 @@
return _Result(_Result.Status.DONE)
def write_sanity_check(self, fd):
+ """Call pw doctor after setting environment variables."""
+
echo_empty = 'echo.' if self._is_windows else 'echo'
if not self._quiet:
- fd.write('echo "{}"\n'.format(
+ # Not quoting args to echo because Windows will treat them as if
+ # they're already quoted and Linux will just space-separate them.
+ fd.write('echo {}\n'.format(
Color.bold('Sanity checking the environment:')))
fd.write('{}\n'.format(echo_empty))
@@ -275,8 +279,9 @@
if not self._quiet:
fd.write(' {}\n'.format(echo_empty))
- fd.write(' echo "{}"\n'.format(
- Color.bold('Environment looks good; you are ready to go!')))
+ # Again, not quoting args to echo.
+ fd.write(' echo {}\n'.format(
+ Color.bold('Environment looks good, you are ready to go!')))
if self._is_windows:
fd.write(')\n')