1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-13 22:28:33 +00:00

Now only return [] when correct error was caught

This commit is contained in:
Andrew Wonnacott 2016-11-03 03:46:27 -04:00
parent 5f6c55d839
commit b4fda04acb
No known key found for this signature in database
GPG Key ID: 9447B2D4A22DE17B

View File

@ -24,8 +24,11 @@ def get_pkgfile(command):
).splitlines()
return [package.split()[0] for package in packages]
except subprocess.CalledProcessError:
return []
except subprocess.CalledProcessError as err:
if err.returncode == 1 and err.output == "":
return []
else:
raise err
def archlinux_env():