summary refs log tree commit diff stats
path: root/compiler/options.nim
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2018-07-30 05:02:18 -0700
committerAndreas Rumpf <rumpf_a@web.de>2018-07-30 14:02:18 +0200
commitc0f78ec0121c2578759e1b7cff561b75a58e3f97 (patch)
tree9a69bae15f82ac51b6794950407176f220e7a745 /compiler/options.nim
parentf2ddd995393bc485880d3e56b277bad6448ad0c3 (diff)
downloadNim-c0f78ec0121c2578759e1b7cff561b75a58e3f97.tar.gz
fixes #8419 fixes #8420 ; workaround #6071 workaround nim-lang/website#98 (#8423)
add --git.devel option to override doc generated "edit" links; add --nimCompiler option to nimweb
Diffstat (limited to 'compiler/options.nim')
-rw-r--r--compiler/options.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/options.nim b/compiler/options.nim
index 7cca40321..fcbb98fe6 100644
--- a/compiler/options.nim
+++ b/compiler/options.nim
@@ -406,8 +406,8 @@ proc mainCommandArg*(conf: ConfigRef): string =
 proc existsConfigVar*(conf: ConfigRef; key: string): bool =
   result = hasKey(conf.configVars, key)
 
-proc getConfigVar*(conf: ConfigRef; key: string): string =
-  result = conf.configVars.getOrDefault key
+proc getConfigVar*(conf: ConfigRef; key: string, default = ""): string =
+  result = conf.configVars.getOrDefault(key, default)
 
 proc setConfigVar*(conf: ConfigRef; key, val: string) =
   conf.configVars[key] = val