This commit is contained in:
pagedown
2022-03-23 19:49:34 +08:00
parent a765d551e4
commit 8569be81ea
4 changed files with 4 additions and 6 deletions

View File

@@ -953,7 +953,7 @@ def macos_version() -> Tuple[int, ...]:
return tuple(map(int, platform.mac_ver()[0].split('.')))
@run_once
@lru_cache(maxsize=2)
def less_version(less_exe: str = 'less') -> int:
import subprocess
o = subprocess.check_output([less_exe, '-V'], stderr=subprocess.STDOUT).decode()