From bad3f7cf29b0312c54df7e3df711b19cba57a26c Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Thu, 5 Aug 2021 19:32:36 +0100 Subject: fix: Make bash envnames pure shell again This should hopefully avoid the previous version's pitfalls by processing the environment line entirely in sed. --- share/bash/template/template.sh.tera | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') diff --git a/share/bash/template/template.sh.tera b/share/bash/template/template.sh.tera index 79e7a15..938509a 100644 --- a/share/bash/template/template.sh.tera +++ b/share/bash/template/template.sh.tera @@ -124,7 +124,7 @@ scenario_{{ loop.index }}() { # contains newlines. envnames() { - python3 -c 'import os, sys; sys.stdout.write("".join("%s\n" % key for key in os.environ))' + env -0 | sed -z 's/^\([^=]\+\)=.*$/\1\n/' | tr '\0' '\n' } # Unset all environment variables. At the beginning of each scenario, -- cgit v1.2.1