summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/main.nim4
-rw-r--r--compiler/scriptconfig.nim13
2 files changed, 16 insertions, 1 deletions
diff --git a/compiler/main.nim b/compiler/main.nim
index 7c043eb72..3bb6fc343 100644
--- a/compiler/main.nim
+++ b/compiler/main.nim
@@ -355,7 +355,9 @@ proc mainCommand* =
     gGlobalOptions.incl(optCaasEnabled)
     msgs.gErrorMax = high(int)  # do not stop after first error
     serve(mainCommand)
-  of "nop", "help": discard
+  of "nop", "help":
+    # prevent the "success" message:
+    gCmd = cmdDump
   else:
     rawMessage(errInvalidCommandX, command)
 
diff --git a/compiler/scriptconfig.nim b/compiler/scriptconfig.nim
index 148a382c2..115ce940d 100644
--- a/compiler/scriptconfig.nim
+++ b/compiler/scriptconfig.nim
@@ -68,9 +68,20 @@ proc setupVM*(module: PSym; scriptName: string): PEvalContext =
     setResult(a, os.getCurrentDir())
   cbos moveFile:
     os.moveFile(getString(a, 0), getString(a, 1))
+  cbos copyFile:
+    os.copyFile(getString(a, 0), getString(a, 1))
   cbos getLastModificationTime:
     setResult(a, toSeconds(getLastModificationTime(getString(a, 0))))
 
+  cbconf getEnv:
+    setResult(a, os.getEnv(a.getString 0))
+  cbconf existsEnv:
+    setResult(a, os.existsEnv(a.getString 0))
+  cbconf dirExists:
+    setResult(a, os.dirExists(a.getString 0))
+  cbconf fileExists:
+    setResult(a, os.fileExists(a.getString 0))
+
   cbconf thisDir:
     setResult(a, vthisDir)
   cbconf put:
@@ -87,6 +98,8 @@ proc setupVM*(module: PSym; scriptName: string): PEvalContext =
     setResult(a, os.paramCount())
   cbconf cmpIgnoreStyle:
     setResult(a, strutils.cmpIgnoreStyle(a.getString 0, a.getString 1))
+  cbconf cmpIgnoreCase:
+    setResult(a, strutils.cmpIgnoreCase(a.getString 0, a.getString 1))
   cbconf setCommand:
     options.command = a.getString 0
   cbconf getCommand: