Remove {.gcsafe.} from procutils.exec.

This commit is contained in:
Jonathan Bernard 2024-12-10 10:42:46 -06:00
parent 30c5720ab8
commit eaffb20df5
3 changed files with 4 additions and 4 deletions

View File

@ -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"

View File

@ -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) =

View File

@ -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)