From 146b463e1d1cdd492d3bce04a10ddc18ca2b7dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernanda=20Guimar=C3=A3es?= Date: Sat, 26 Oct 2019 15:11:43 -0300 Subject: [PATCH] Only including necessary envs in THEFUCK_DEBUG=true. --- thefuck/output_readers/rerun.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/thefuck/output_readers/rerun.py b/thefuck/output_readers/rerun.py index af4f331a..af2225da 100644 --- a/thefuck/output_readers/rerun.py +++ b/thefuck/output_readers/rerun.py @@ -52,11 +52,12 @@ def get_output(script, expanded): """ env = dict(os.environ) env.update(settings.env) + log_env = {key: env[key] for key in ['TF_SHELL', 'TF_ALIAS', 'TF_SHELL_ALIASES'] if key in env} split_expand = shlex.split(expanded) 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( - script, env, is_slow)): + script, log_env, is_slow)): result = Popen(expanded, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT, env=env) if _wait_output(result, is_slow):