diff options
author | Anthon van der Neut <anthon@mnt.org> | 2019-03-08 13:20:36 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-03-08 13:20:36 +0100 |
commit | 1a13b3a14eafc35615c7e9f1b72b3ab646fa7550 (patch) | |
tree | 0522c708665ef0fca7dc434501ba660f6dd10962 /lib/pure | |
parent | 5c201791b31d02ebb979408c954104d8edb087ba (diff) | |
download | Nim-1a13b3a14eafc35615c7e9f1b72b3ab646fa7550.tar.gz |
Follow the documentation's recommendation (#10808)
The doc states "Make sure to pass options explicitly.", but the example didn't. Since constructing a string for the shell with appropriate quotes is non-trivial, the first example should be how to use `execProcess` including `args`
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/osproc.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index 19d26f2eb..f3b9c1545 100644 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -97,7 +97,8 @@ proc execProcess*(command: string, ## Example: ## ## .. code-block:: Nim - ## let outp = execProcess("nim c -r mytestfile.nim") + ## let outp = execProcess("/usr/bin/env", ["nim", "c", "-r", "mytestfile.nim"], option={}) + ## let outp_shell = execProcess("nim c -r mytestfile.nim") ## # Note: outp may have an interleave of text from the nim compile ## # and any output from mytestfile when it runs |