This commit is contained in:
a 2020-10-21 22:45:55 +03:00
parent ab54a9db22
commit 4141dd82af

View file

@ -100,16 +100,14 @@ class CommandsCache(cabc.Mapping):
self._path_mtime = max_mtime self._path_mtime = max_mtime
if cache_valid_path and cache_valid_paths: if cache_valid_path and cache_valid_paths:
if cache_valid_aliases: if not cache_valid_aliases:
return self._cmds_cache
else:
for cmd, alias in alss.items(): for cmd, alias in alss.items():
key = cmd.upper() if ON_WINDOWS else cmd key = cmd.upper() if ON_WINDOWS else cmd
if key in self._cmds_cache: if key in self._cmds_cache:
self._cmds_cache[key] = (self._cmds_cache[key][0], alias) self._cmds_cache[key] = (self._cmds_cache[key][0], alias)
else: else:
self._cmds_cache[key] = (cmd, True) self._cmds_cache[key] = (cmd, True)
return self._cmds_cache return self._cmds_cache
allcmds = {} allcmds = {}
for path in reversed(path_immut): for path in reversed(path_immut):