Remove {.gcsafe.} from procutils.exec.
This commit is contained in:
parent
30c5720ab8
commit
eaffb20df5
@ -1,6 +1,6 @@
|
||||
# Package
|
||||
|
||||
version = "0.9.0"
|
||||
version = "0.9.1"
|
||||
author = "Jonathan Bernard"
|
||||
description = "Helper functions for writing command line interfaces."
|
||||
license = "MIT"
|
||||
|
@ -6,13 +6,13 @@ type
|
||||
docopt*: Table[string, Value]
|
||||
json*: JsonNode
|
||||
|
||||
func keyNames(key: string): tuple[arg, env, json: string] {.raises: [KeyError].} =
|
||||
proc keyNames(key: string): tuple[arg, env, json: string] {.raises: [KeyError].} =
|
||||
try:
|
||||
result = (
|
||||
"--" & key,
|
||||
key.replace('-', '_').toUpper,
|
||||
key.replace(re"(-\w)", proc (m: RegexMatch): string = ($m)[1..1].toUpper))
|
||||
except CatchableError:
|
||||
except Exception:
|
||||
raise newException(KeyError, "invalid config key: '" & key & "'")
|
||||
|
||||
template walkFieldDefs*(t: NimNode, body: untyped) =
|
||||
|
@ -47,7 +47,7 @@ proc exec*(command: string, workingDir: string = "",
|
||||
args: openArray[string] = [], env: StringTableRef = nil,
|
||||
options: set[ProcessOption] = {poUsePath},
|
||||
msgCB: HandleProcMsgCB = nil): int
|
||||
{.tags: [ExecIOEffect, ReadIOEffect, RootEffect], gcsafe.} =
|
||||
{.tags: [ExecIOEffect, ReadIOEffect, RootEffect].} =
|
||||
|
||||
var p = startProcess(command, workingDir, args, env, options)
|
||||
result = waitFor(p, msgCB, command)
|
||||
|
Loading…
x
Reference in New Issue
Block a user