Skip to content

Commit f542996

Browse files
committed
make user defined path in front of system path
1 parent 5eb8134 commit f542996

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

0.9.x/writetex.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,9 @@ def handle_path(newpath):
369369
if newpath in paths:
370370
return
371371
if newpath:
372-
os.environ['PATH'] += os.path.pathsep + newpath
372+
# Keep new paths in front of system path. Suggested by @L-N1988 in
373+
# https://github.com/wanglongqi/WriteTeX/issues/29
374+
os.environ['PATH'] = newpath + os.path.pathsep + os.environ['PATH']
373375

374376
if __name__ == '__main__':
375377
e = WriteTex()

1.x.x/writetex.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,9 @@ def handle_path(newpath):
373373
if newpath in paths:
374374
return
375375
if newpath:
376-
os.environ['PATH'] += os.path.pathsep + newpath
376+
# Keep new paths in front of system path. Suggested by @L-N1988 in
377+
# https://github.com/wanglongqi/WriteTeX/issues/29
378+
os.environ['PATH'] = newpath + os.path.pathsep + os.environ['PATH']
377379

378380
if __name__ == '__main__':
379381
e = WriteTex()

0 commit comments

Comments
 (0)