We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0a3801e + b410336 commit 120b2cdCopy full SHA for 120b2cd
SCons/Tool/MSCommon/common.py
@@ -119,10 +119,12 @@ def read_script_env_cache() -> dict:
119
p = Path(CONFIG_CACHE)
120
if not CONFIG_CACHE or not p.is_file():
121
return envcache
122
- with SCons.Util.FileLock(CONFIG_CACHE, timeout=5), p.open('r') as f:
+ with SCons.Util.FileLock(CONFIG_CACHE, timeout=5, writer=True), p.open('r') as f:
123
# Convert the list of cache entry dictionaries read from
124
# json to the cache dictionary. Reconstruct the cache key
125
# tuple from the key list written to json.
126
+ # Note we need to take a write lock on the cachefile, as if there's
127
+ # an error and we try to remove it, that's "writing" on Windows.
128
try:
129
envcache_list = json.load(f)
130
except json.JSONDecodeError:
0 commit comments