Skip to content

Commit

Permalink
Make sure that environment is properly set up
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkdp committed Aug 3, 2020
1 parent 9110b00 commit cbe68ba
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/syntax-tests/create_highlighted_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,17 @@ def create_highlighted_versions(output_basepath):

for source in glob.glob(path.join(root, "source", "*", "*")):
try:
env = os.environ.copy()
env.pop("PAGER", None)
env.pop("BAT_PAGER", None)
env.pop("BAT_CONFIG_PATH", None)
env.pop("BAT_STYLE", None)
env.pop("BAT_THEME", None)
env.pop("BAT_TABS", None)
env["COLORTERM"] = "truecolor" # make sure to output 24bit colors

bat_output = subprocess.check_output(
["bat"] + BAT_OPTIONS + [source], stderr=subprocess.PIPE,
["bat"] + BAT_OPTIONS + [source], stderr=subprocess.PIPE, env=env,
)

source_dirname = path.basename(path.dirname(source))
Expand Down

0 comments on commit cbe68ba

Please sign in to comment.