File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -119,10 +119,12 @@ def read_script_env_cache() -> dict:
119
119
p = Path (CONFIG_CACHE )
120
120
if not CONFIG_CACHE or not p .is_file ():
121
121
return envcache
122
- with SCons .Util .FileLock (CONFIG_CACHE , timeout = 5 ), p .open ('r' ) as f :
122
+ with SCons .Util .FileLock (CONFIG_CACHE , timeout = 5 , writer = True ), p .open ('r' ) as f :
123
123
# Convert the list of cache entry dictionaries read from
124
124
# json to the cache dictionary. Reconstruct the cache key
125
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.
126
128
try :
127
129
envcache_list = json .load (f )
128
130
except json .JSONDecodeError :
You can’t perform that action at this time.
0 commit comments