Don't include .exe when searching for latest version of a command on WSL.
This commit is contained in:
parent
865c18dfa3
commit
283556e998
|
@ -111,7 +111,7 @@ def build(componentSpec: str, targetSpec: str, props: Props = {}) -> ComponentIn
|
|||
raise RuntimeError(
|
||||
f"Component {componentSpec} is disabled: {instance.disableReason}")
|
||||
|
||||
shell.exec(f"ninja", "-v", "-f", ninjaPath, instance.outfile())
|
||||
shell.exec(f"ninja", "-f", ninjaPath, instance.outfile())
|
||||
|
||||
return instance
|
||||
|
||||
|
|
|
@ -234,7 +234,12 @@ def latest(cmd: str) -> str:
|
|||
|
||||
logger.info(f"Finding latest version of {cmd}")
|
||||
|
||||
regex = re.compile(r"^" + re.escape(cmd) + r"(-.[0-9]+)?(\.exe)?$")
|
||||
regex: re.Pattern[str]
|
||||
|
||||
if platform.system() == "Windows":
|
||||
regex = re.compile(r"^" + re.escape(cmd) + r"(-.[0-9]+)?(\.exe)?$")
|
||||
else:
|
||||
regex = re.compile(r"^" + re.escape(cmd) + r"(-[0-9]+)?$")
|
||||
|
||||
versions: list[str] = []
|
||||
for path in os.environ["PATH"].split(os.pathsep):
|
||||
|
|
Loading…
Reference in a new issue