From 7728ec97cae2684e72e998b2c3fa6019f7a5db16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sat, 18 Sep 2021 14:38:20 +0200 Subject: [PATCH] take environment directly in edit method --- scripts/edit.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/edit.py b/scripts/edit.py index 38c5956..87fd440 100644 --- a/scripts/edit.py +++ b/scripts/edit.py @@ -5,14 +5,11 @@ from pathlib import Path import os -def edit(filepath: Path, rootpath: Path = None, texinputs=None): - env = dict(os.environ) - if texinputs: - env["TEXINPUTS"] = texinputs +def edit(filepath: Path, rootpath: Path = None, env=os.environ): if not rootpath: rootpath = filepath subprocess.Popen([ "termite", "-e", f"vim --servername tex-vorlesung --remote-silent {str(filepath)}" - ], env=env, cwd=str(rootpath.root)) + ], env=env, cwd=str(rootpath))