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:
Ivan Bobev 2019-08-06 18:08:51 +03:00 committed by Dominik Picheta
commit bfc4f25548

View file

@ -6,6 +6,9 @@
import system except getCommand, setCommand, switch, `--` import system except getCommand, setCommand, switch, `--`
import strformat, strutils, tables import strformat, strutils, tables
when not defined(nimscript):
import os
var var
packageName* = "" ## Set this to the package name. It packageName* = "" ## Set this to the package name. It
## is usually not required to do that, nims' filename is ## is usually not required to do that, nims' filename is