get_dev_uuid_var_path: Fix theoretical shell quoting problem.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2019-03-04 14:32:06 -08:00
committed by Tim Abbott
parent ddb965110f
commit d9adc9d7bc

View File

@@ -157,8 +157,8 @@ def get_dev_uuid_var_path(create_if_missing=False):
zulip_uuid = str(uuid.uuid4())
# We need root access here, since the path will be under /srv/ in the
# development environment.
run_as_root(["/bin/bash", "-c",
"echo %s > %s" % (zulip_uuid, uuid_path)])
run_as_root(["sh", "-c", 'echo "$1" > "$2"', "-",
zulip_uuid, uuid_path])
else:
raise AssertionError("Missing UUID file; please run tools/provision!")