mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-18 12:06:04 +00:00
#74 Don't fail when runned without args
This commit is contained in:
parent
d09238a6e8
commit
d5b4bddc4c
@ -61,6 +61,7 @@ def test_get_command():
|
||||
stdout=PIPE,
|
||||
stderr=PIPE,
|
||||
env={'LANG': 'C'})
|
||||
assert main.get_command(Mock(), ['']) is None
|
||||
|
||||
|
||||
def test_get_matched_rule():
|
||||
|
@ -80,6 +80,10 @@ def get_command(settings, args):
|
||||
script = ' '.join(arg.decode('utf-8') for arg in args[1:])
|
||||
else:
|
||||
script = ' '.join(args[1:])
|
||||
|
||||
if not script:
|
||||
return
|
||||
|
||||
result = Popen(script, shell=True, stdout=PIPE, stderr=PIPE,
|
||||
env=dict(os.environ, LANG='C'))
|
||||
if wait_output(settings, result):
|
||||
|
Loading…
x
Reference in New Issue
Block a user