• The 'Exec' function is an asynchronous function that executes a command and logs the stdout and stderr of the child process.

    Parameters

    • Command: string

      The 'Command' parameter is a string that represents the command you want to execute. It can be any valid command that can be executed in a terminal or command prompt.

    • OptionalEcho: false | ((Return: any, _Error?: boolean) => Promise<void>)

      An optional parameter that controls whether the stdout and stderr of the child process should be logged. If set to 'false', no logging will occur. If set to a function, the function will be called with the stdout and stderr data as a parameter for custom logging. If not provided, stdout and stderr will be logged to the console by default.

    Returns Promise<void>