From eb3422c1ea5b2ad4809d9a71557d2a858bea7472 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Fri, 31 Aug 2018 09:47:02 +0100 Subject: [PATCH] env var write: add missing newline_separator back --- common.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common.py b/common.py index df2789a..6721600 100644 --- a/common.py +++ b/common.py @@ -154,8 +154,12 @@ def get_stats(stat_re=None, stats_file=None): def print_cmd(cmd, cmd_file=None, extra_env=None): """ Format a command given as a list of strings so that it can - be viewed nicely and executed by bash directly. + be viewed nicely and executed by bash directly and print it to stdout. + + Optionally save the command to cmd_file file, and add extra_env + environment variables to the command generated. """ + newline_separator = ' \\\n' out = [] for key in extra_env: out.extend(['{}={}'.format(shlex.quote(key), shlex.quote(extra_env[key])), newline_separator])