@mikeyt23/node-cli-utils
    Preparing search index...

    Function simpleSpawnSync

    • Runs the requested command using NodeJS spawnSync and returns the result with stdout split into lines.

      Use this for simple quick commands that don't require a lot of control.

      For commands that are Windows and CMD specific, use simpleCmdSync.

      Warning: Do NOT use this for generating commands dynamically from user input as it could be used to execute arbitrary code. This is meant solely for building up known commands that are not made up of unsanitized user input, and only at compile time. See winInstallCert and winUninstallCert for examples of taking user input and inserting it safely into known commands.

      Parameters

      Returns SimpleSpawnResult

      An object with the status code, stdout, stderr, and error (if any)

      SimpleSpawnError if the command fails and throwOnNonZero option is true