Jump to headingexecSync(command: string): BufferThe child_process.execSync() method is generally identical to exec with the exception that the method will not return
until the child process has fully closed. When a timeout has been encountered
and killSignal is sent, the method won't return until the process has
completely exited. If the child process intercepts and handles the SIGTERM signal and doesn't exit, the parent process will wait until the child process
has exited.
If the process times out or has a non-zero exit code, this method will throw.
The Error object will contain the entire result from spawnSync.
Never pass unsanitized user input to this function. Any input containing shell metacharacters may be used to trigger arbitrary command execution.
Parameters Jump to heading
Jump to headingcommand: stringThe command to run.
Return Type Jump to heading
BufferThe stdout from the command.
Jump to headingexecSync(command: string,options: ExecSyncOptionsWithStringEncoding,): stringParameters Jump to heading
Jump to headingcommand: stringReturn Type Jump to heading
stringJump to headingexecSync(command: string,options: ExecSyncOptionsWithBufferEncoding,): BufferParameters Jump to heading
Jump to headingcommand: stringReturn Type Jump to heading
BufferJump to headingexecSync(command: string,options?: ExecSyncOptions,): string | BufferParameters Jump to heading
Jump to headingcommand: stringJump to headingoptions: ExecSyncOptionsReturn Type Jump to heading
string | Buffer