cli: Print EnvironmentErrors on stderr
Errors such as "no such file or directory" should not be printed on standard output.
This commit is contained in:
@@ -123,7 +123,7 @@ def run(argv=None):
|
|||||||
if not first and args.format != 'parsable':
|
if not first and args.format != 'parsable':
|
||||||
print('')
|
print('')
|
||||||
except EnvironmentError as e:
|
except EnvironmentError as e:
|
||||||
print(e)
|
print(e, file=sys.stderr)
|
||||||
return_code = -1
|
return_code = -1
|
||||||
|
|
||||||
sys.exit(return_code)
|
sys.exit(return_code)
|
||||||
|
|||||||
Reference in New Issue
Block a user