1
0
Fork 0

single-file supports version cli flag now

This commit is contained in:
Nick Sweeting 2020-08-18 15:00:12 -04:00
parent 8b427c9d79
commit 71788cfd26

View file

@ -508,13 +508,6 @@ def bin_version(binary: Optional[str]) -> Optional[str]:
return None
try:
if binary.split('/')[-1] in ('single-file',):
# these dependencies dont support the --version flag, but are valid still
if run([abspath, "--help"], stdout=PIPE).returncode == 0:
return '0.0.0'
else:
return None
else:
version_str = run([abspath, "--version"], stdout=PIPE).stdout.strip().decode()
# take first 3 columns of first line of version info
return ' '.join(version_str.split('\n')[0].strip().split()[:3])