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

    Function simpleCmdAsync

    • Runs the requested command using spawnAsync wrapped in an outer Windows CMD.exe command 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 aren't Windows and CMD specific, use simpleSpawnAsync.

      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 Promise<SimpleSpawnResult>

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

      SimpleSpawnError if the command fails and throwOnNonZero option is true