Skip to content
Adam Smith edited this page Feb 16, 2016 · 10 revisions

vitals.run npm version

Method Section Alias
run shell

run

A shortcut for child_process.spawnSync that returns the stdout.

Examples

Params

  1. cmd string

  2. opts Object= - opts.eol ?string=

    default value: "LF"

    The end of line character to use when normalizing the result. If opts.eol is null or opts.buffer is true and opts.eol is undefined no normalization is completed. Optional values: "LF", "CR", "CRLF" - opts.buffer boolean=

    default value: false

    If true and stdout is a buffer the buffer is returned. Otherwise a string of stdout is returned. - opts.catchExit boolean=

    default value: true

    If process is exited with an error code an error is logged. - opts.encoding string=

    default value: "utf8"

    If opts.buffer is true and opts.encoding is undefined no encoding is set. - opts.cwd string= - opts.input (string|!Buffer)= - opts.env !Object= - opts.uid number= - opts.gid number= - opts.timeout number= - opts.killSignal string= - opts.maxBuffer number=

Returns (string|!Buffer)

-- Happy Developing,

Algorithm IV Logo

Clone this wiki locally