mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-20 01:28:56 +00:00
Fix quotes problem with shell.split_command
This commit is contained in:
parent
c196e2901c
commit
4c4ff06abf
@ -1,9 +1,9 @@
|
|||||||
import os
|
import os
|
||||||
import shlex
|
|
||||||
from subprocess import Popen, PIPE, STDOUT
|
from subprocess import Popen, PIPE, STDOUT
|
||||||
from psutil import AccessDenied, Process, TimeoutExpired
|
from psutil import AccessDenied, Process, TimeoutExpired
|
||||||
from .. import logs
|
from .. import logs
|
||||||
from ..conf import settings
|
from ..conf import settings
|
||||||
|
from ..shells import shell
|
||||||
|
|
||||||
|
|
||||||
def _kill_process(proc):
|
def _kill_process(proc):
|
||||||
@ -53,7 +53,7 @@ def get_output(script, expanded):
|
|||||||
env = dict(os.environ)
|
env = dict(os.environ)
|
||||||
env.update(settings.env)
|
env.update(settings.env)
|
||||||
|
|
||||||
split_expand = shlex.split(expanded)
|
split_expand = shell.split_command(expanded)
|
||||||
is_slow = split_expand[0] in settings.slow_commands if split_expand else False
|
is_slow = split_expand[0] in settings.slow_commands if split_expand else False
|
||||||
with logs.debug_time(u'Call: {}; with env: {}; is slow: {}'.format(
|
with logs.debug_time(u'Call: {}; with env: {}; is slow: {}'.format(
|
||||||
script, env, is_slow)):
|
script, env, is_slow)):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user