diff options
author | Richard Samuels <richard.l.samuels@gmail.com> | 2021-04-01 11:36:08 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-04-01 17:32:12 +0000 |
commit | 24aa56a6ed096a470f1380709b87084ff74106b5 (patch) | |
tree | f41fc8c002c1bc7fc2346750acf5206c7275fe02 /buildscripts/generate_compile_expansions_shared_cache.py | |
parent | c2f5a747a5c55f35f51ce59d58f707c75940ba23 (diff) | |
download | mongo-24aa56a6ed096a470f1380709b87084ff74106b5.tar.gz |
SERVER-55300 Implement expansions handling for standalone shell
Diffstat (limited to 'buildscripts/generate_compile_expansions_shared_cache.py')
-rwxr-xr-x | buildscripts/generate_compile_expansions_shared_cache.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/buildscripts/generate_compile_expansions_shared_cache.py b/buildscripts/generate_compile_expansions_shared_cache.py index 685eedb629f..4f31341c806 100755 --- a/buildscripts/generate_compile_expansions_shared_cache.py +++ b/buildscripts/generate_compile_expansions_shared_cache.py @@ -11,6 +11,7 @@ import json import os import re import sys +import shlex import yaml VERSION_JSON = "version.json" @@ -99,8 +100,8 @@ def generate_scons_cache_expansions(): shared_mount_root = '/efs' default_cache_path = os.path.join(shared_mount_root, system_uuid, "scons-cache") expansions["scons_cache_path"] = default_cache_path - expansions["scons_cache_args"] = "--cache={0} --cache-dir='{1}'".format( - scons_cache_mode, default_cache_path) + expansions["scons_cache_args"] = "--cache={0} --cache-dir={1}".format( + scons_cache_mode, shlex.quote(default_cache_path)) # Local shared cache - host-based elif os.getenv("SCONS_CACHE_SCOPE") == "local": @@ -112,8 +113,8 @@ def generate_scons_cache_expansions(): default_cache_path = os.path.join(default_cache_path_base, system_uuid) expansions["scons_cache_path"] = default_cache_path - expansions["scons_cache_args"] = "--cache={0} --cache-dir='{1}'".format( - scons_cache_mode, default_cache_path) + expansions["scons_cache_args"] = "--cache={0} --cache-dir={1}".format( + scons_cache_mode, shlex.quote(default_cache_path)) # No cache else: # Anything else is 'none' |