mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-23 11:17:02 -04:00
Fix bin_version: set LANG=C when calling executables to avoid parsing
localized output.
This commit is contained in:
parent
bf432d4931
commit
5e9d05483e
1 changed files with 1 additions and 1 deletions
|
@ -650,7 +650,7 @@ def bin_version(binary: Optional[str]) -> Optional[str]:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
version_str = run([abspath, "--version"], stdout=PIPE).stdout.strip().decode()
|
version_str = run([abspath, "--version"], stdout=PIPE, env={'LANG': 'C'}).stdout.strip().decode()
|
||||||
# take first 3 columns of first line of version info
|
# take first 3 columns of first line of version info
|
||||||
return ' '.join(version_str.split('\n')[0].strip().split()[:3])
|
return ' '.join(version_str.split('\n')[0].strip().split()[:3])
|
||||||
except OSError:
|
except OSError:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue