fixes #9120
This commit is contained in:
parent
d91d1865b8
commit
9526009e0e
3 changed files with 2 additions and 12 deletions
|
|
@ -48,16 +48,6 @@ proc loadConfigsAndRunMainCommand*(self: NimProg, cache: IdentCache; conf: Confi
|
||||||
if self.suggestMode:
|
if self.suggestMode:
|
||||||
conf.command = "nimsuggest"
|
conf.command = "nimsuggest"
|
||||||
|
|
||||||
when false:
|
|
||||||
# These defines/options should not be enabled while processing nimscript
|
|
||||||
# bug #9420
|
|
||||||
undefSymbol(conf.symbols, "profiler")
|
|
||||||
undefSymbol(conf.symbols, "memProfiler")
|
|
||||||
undefSymbol(conf.symbols, "nodejs")
|
|
||||||
|
|
||||||
# bug #9120
|
|
||||||
conf.globalOptions.excl(optTaintMode)
|
|
||||||
|
|
||||||
template runNimScriptIfExists(path: AbsoluteFile) =
|
template runNimScriptIfExists(path: AbsoluteFile) =
|
||||||
let p = path # eval once
|
let p = path # eval once
|
||||||
if fileExists(p):
|
if fileExists(p):
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ when declared(os.paramCount):
|
||||||
proc remainingArgs*(p: OptParser): seq[TaintedString] {.rtl, extern: "npo$1".} =
|
proc remainingArgs*(p: OptParser): seq[TaintedString] {.rtl, extern: "npo$1".} =
|
||||||
## retrieves the rest of the command line that has not been parsed yet.
|
## retrieves the rest of the command line that has not been parsed yet.
|
||||||
result = @[]
|
result = @[]
|
||||||
for i in p.idx..<p.cmds.len: result.add p.cmds[i]
|
for i in p.idx..<p.cmds.len: result.add TaintedString(p.cmds[i])
|
||||||
|
|
||||||
iterator getopt*(p: var OptParser): tuple[kind: CmdLineKind, key, val: TaintedString] =
|
iterator getopt*(p: var OptParser): tuple[kind: CmdLineKind, key, val: TaintedString] =
|
||||||
## This is an convenience iterator for iterating over the given OptParser object.
|
## This is an convenience iterator for iterating over the given OptParser object.
|
||||||
|
|
|
||||||
|
|
@ -3147,7 +3147,7 @@ when not defined(JS): #and not defined(nimscript):
|
||||||
result = x.len - y.len
|
result = x.len - y.len
|
||||||
|
|
||||||
when defined(nimscript):
|
when defined(nimscript):
|
||||||
proc readFile*(filename: string): string {.tags: [ReadIOEffect], benign.}
|
proc readFile*(filename: string): TaintedString {.tags: [ReadIOEffect], benign.}
|
||||||
## Opens a file named `filename` for reading, calls `readAll
|
## Opens a file named `filename` for reading, calls `readAll
|
||||||
## <#readAll>`_ and closes the file afterwards. Returns the string.
|
## <#readAll>`_ and closes the file afterwards. Returns the string.
|
||||||
## Raises an IO exception in case of an error. If # you need to call
|
## Raises an IO exception in case of an error. If # you need to call
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue