diff options
author | Araq <rumpf_a@web.de> | 2017-01-07 02:38:26 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2017-01-07 02:38:26 +0100 |
commit | 9d488261dfafd90870f46e5b361dc55df301ff16 (patch) | |
tree | 357d620e297885f95f7edbb5aa189cf5a87e0aea /lib | |
parent | a17d996be9a7dd9086a1a4707486dd6b213ed632 (diff) | |
download | Nim-9d488261dfafd90870f46e5b361dc55df301ff16.tar.gz |
added system.gorgeEx that includes the exitCode; refs #4874; fixes #1994
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/system.nim b/lib/system.nim index 309df7f84..83dc20869 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -3368,6 +3368,11 @@ proc staticExec*(command: string, input = "", cache = ""): string {. ## .. code-block:: nim ## const stateMachine = staticExec("dfaoptimizer", "input", "0.8.0") +proc gorgeEx*(command: string, input = "", cache = ""): tuple[output: string, + exitCode: int] = + ## Same as `gorge` but also returns the precious exit code. + discard + proc `+=`*[T: SomeOrdinal|uint|uint64](x: var T, y: T) {. magic: "Inc", noSideEffect.} ## Increments an ordinal |