Skip to content

Commit

Permalink
[compiler] import os for older Nim versions for env var access
Browse files Browse the repository at this point in the history
  • Loading branch information
Vindaar committed Feb 9, 2024
1 parent a4ba1bf commit 845e41b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/latexdsl/latex_compiler.nim
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ proc writeTeXFile*(fname, body, tmpl: string,
f.write(tmpl)
f.close()

import std / [envvars, strutils]
when (NimMajor, NimMinor, NimPatch) >= (2, 0, 0):
import std / [envvars, strutils]
else:
import std / [os, strutils]
proc compile*(fname, body: string, tmpl = getStandaloneTmpl(),
path = "", fullBody = false, verbose = true) =
## Writes and compiles the file `fname` with contents `body`. If no explicit
Expand Down

0 comments on commit 845e41b

Please sign in to comment.