diff options
Diffstat (limited to 'compiler/commands.nim')
-rw-r--r-- | compiler/commands.nim | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim index 38c8dd294..7219c168a 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -291,8 +291,12 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo) = of "excludepath": expectArg(switch, arg, pass, info) let path = processPath(arg) - lists.excludeStr(options.searchPaths, path) - lists.excludeStr(options.lazyPaths, path) + lists.excludePath(options.searchPaths, path) + lists.excludePath(options.lazyPaths, path) + if (len(path) > 0) and (path[len(path) - 1] == DirSep): + let strippedPath = path[0 .. (len(path) - 2)] + lists.excludePath(options.searchPaths, strippedPath) + lists.excludePath(options.lazyPaths, strippedPath) of "nimcache": expectArg(switch, arg, pass, info) options.nimcacheDir = processPath(arg) |