Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Process.php

function Process::mustRun

Same name in this branch
  1. 11.1.x vendor/php-tuf/composer-stager/src/Internal/Process/Service/Process.php \PhpTuf\ComposerStager\Internal\Process\Service\Process::mustRun()

Runs the process.

This is identical to run() except that an exception is thrown if the process exits with a non-zero exit code.

@final

Return value

$this

Throws

ProcessFailedException if the process didn't terminate successfully

File

vendor/symfony/process/Process.php, line 267

Class

Process
Process is a thin wrapper around proc_* functions to easily start independent PHP processes.

Namespace

Symfony\Component\Process

Code

public function mustRun(?callable $callback = null, array $env = []) : static {
    if (0 !== $this->run($callback, $env)) {
        throw new ProcessFailedException($this);
    }
    return $this;
}
RSS feed
Powered by Drupal