mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-25 23:36:22 +02:00
Fix bin_version: set LANG=C when calling executables to avoid parsing
localized output.
This commit is contained in:
@@ -650,7 +650,7 @@ def bin_version(binary: Optional[str]) -> Optional[str]:
|
||||
return None
|
||||
|
||||
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
|
||||
return ' '.join(version_str.split('\n')[0].strip().split()[:3])
|
||||
except OSError:
|
||||
|
Reference in New Issue
Block a user