File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change 17
17
ensure_symlink ,
18
18
exec_command ,
19
19
fatal ,
20
+ is_windows ,
20
21
message ,
21
22
MessageType ,
22
23
PrintBar ,
@@ -232,24 +233,20 @@ def problem_data(problem: "Problem", language: str):
232
233
233
234
234
235
def make_environment () -> dict [str , str ]:
236
+ sep = ";" if is_windows () else ":"
235
237
env = os .environ .copy ()
236
238
# Search the contest directory and the latex directory.
237
239
latex_paths = [
238
- Path .cwd (),
239
- Path .cwd () / " solve_stats" ,
240
- Path .cwd () / "solve_stats" / "activity " ,
241
- config .TOOLS_ROOT / " latex" ,
240
+ f" { Path .cwd ()} " ,
241
+ f" { Path .cwd () / ' solve_stats' } // " ,
242
+ f" { Path .cwd () / 'latex' } // " ,
243
+ f" { config .TOOLS_ROOT / ' latex' } // " ,
242
244
]
243
- texinputs = ""
244
- for p in latex_paths :
245
- texinputs += str (p ) + ";"
245
+ texinputs = sep .join (latex_paths ) + sep
246
246
if config .args .verbose >= 2 :
247
247
print (f"export TEXINPUTS='{ texinputs } '" , file = sys .stderr )
248
248
if "TEXINPUTS" in env :
249
- prev = env ["TEXINPUTS" ]
250
- if len (prev ) > 0 and prev [- 1 ] != ";" :
251
- prev += ";"
252
- texinputs = prev + texinputs
249
+ texinputs = texinputs + env ["TEXINPUTS" ]
253
250
env ["TEXINPUTS" ] = texinputs
254
251
return env
255
252
You can’t perform that action at this time.
0 commit comments