Skip to content

Commit

Permalink
Merge pull request #2183 from nickanderson/CFE-3103/3.12
Browse files Browse the repository at this point in the history
CFE-3103/3.12 Clarified output captured by execresult() includes both stdout and stderr
  • Loading branch information
nickanderson committed Jul 26, 2019
2 parents 5c298ac + 91d6ca6 commit 5f93799
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions reference/functions/execresult.markdown
Expand Up @@ -7,7 +7,7 @@ tags: [reference, utility functions, functions, execresult, cached function]

[%CFEngine_function_prototype(command, shell)%]

**Description:** Execute `command` and return output as `string`.
**Description:** Execute `command` and return output (both `stdout` and `stderr`) as `string`.

If the command is not found, the result will be the empty string.

Expand Down Expand Up @@ -43,7 +43,8 @@ only. Effectively calls to this function will be also repeatedly
executed by `cf-promises` when it does syntax checking, which is
highly undesirable if the command is expensive. Consider using
`commands` promises instead, which have locking and are not evaluated
by `cf-promises`.
by `cf-promises`. If capturing stderr is undesirable, consider **useshell** and
redirecting it to `/dev/null`.

**See also:** [`returnszero()`][returnszero].

Expand Down

0 comments on commit 5f93799

Please sign in to comment.