(sh & args)Passes the given strings to child-process.spawnSync() to launch a sub-process.
Options are :in may be given followed by any legal input source for Buffer or String, to be fed to the sub-process's stdin. :in-enc option may be given followed by a String, used as a character encoding name (for example "UTF-8" or "ISO-8859-1") to convert the input string specified by the :in option to the sub-process's stdin. Defaults to UTF-8. If the :in option provides a byte array, then the bytes are passed unencoded, and this option is ignored. :out-enc option may be given followed by a String. If a String is given, it will be used as a character encoding name (for example "UTF-8" or "ISO-8859-1") to convert the sub-process's stdout to a String which is returned. Defaults to UTF-8. :env override the process env with a map. :dir override the process dir with a String. You can bind :env or :dir for multiple operations using with-sh-env and with-sh-dir. sh returns a map of :exit => sub-process's exit code :out => sub-process's stdout (as Buffer or String) :err => sub-process's stderr (String via platform default encoding)
Passes the given strings to child-process.spawnSync() to launch a
sub-process.
Options are
:in may be given followed by any legal input source for
Buffer or String, to be fed to the sub-process's stdin.
:in-enc option may be given followed by a String, used as a character
encoding name (for example "UTF-8" or "ISO-8859-1") to
convert the input string specified by the :in option to the
sub-process's stdin. Defaults to UTF-8.
If the :in option provides a byte array, then the bytes are passed
unencoded, and this option is ignored.
:out-enc option may be given followed by a String. If a String is
given, it will be used as a character encoding name (for example
"UTF-8" or "ISO-8859-1") to convert the sub-process's stdout
to a String which is returned. Defaults to UTF-8.
:env override the process env with a map.
:dir override the process dir with a String.
You can bind :env or :dir for multiple operations using with-sh-env
and with-sh-dir.
sh returns a map of
:exit => sub-process's exit code
:out => sub-process's stdout (as Buffer or String)
:err => sub-process's stderr (String via platform default encoding)(with-sh-dir dir & forms)Sets the directory for use with sh, see sh for details.
Sets the directory for use with sh, see sh for details.
(with-sh-env env & forms)Sets the environment for use with sh, see sh for details.
Sets the environment for use with sh, see sh for details.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |