summary refs log tree commit diff stats
path: root/compiler/commands.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/commands.nim')
-rw-r--r--compiler/commands.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim
index d3266930b..fa7841275 100644
--- a/compiler/commands.nim
+++ b/compiler/commands.nim
@@ -249,10 +249,13 @@ proc processSwitch(switch, arg: string, pass: TCmdlinePass, info: TLineInfo) =
     expectArg(switch, arg, pass, info)
     addPath(processPath(arg), info)
   of "babelpath":
-    if pass in {passCmd2, passPP}:
+    if pass in {passCmd2, passPP} and not options.gNoBabelPath:
       expectArg(switch, arg, pass, info)
       let path = processPath(arg, notRelativeToProj=true)
       babelpath(path, info)
+  of "nobabelpath":
+    expectNoArg(switch, arg, pass, info)
+    options.gNoBabelPath = true
   of "excludepath":
     expectArg(switch, arg, pass, info)
     let path = processPath(arg)