Fix compilation of nimscriptapi.nim
To compile the nimscriptapi.nim file, it is needed to import the os module, but if so the getParams procedure cannot be executed from nimscript any more. The problem is resolved by conditionally importing the module. Related to #680
This commit is contained in:
parent
6e5761b192
commit
bfc4f25548
1 changed files with 3 additions and 0 deletions
|
|
@ -6,6 +6,9 @@
|
|||
import system except getCommand, setCommand, switch, `--`
|
||||
import strformat, strutils, tables
|
||||
|
||||
when not defined(nimscript):
|
||||
import os
|
||||
|
||||
var
|
||||
packageName* = "" ## Set this to the package name. It
|
||||
## is usually not required to do that, nims' filename is
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue