Added link to composer.org docs on ProcessTimedOutException (#9796)
parent
d75d79b452
commit
7c602d8807
|
@ -33,6 +33,7 @@ use Composer\Util\ErrorHandler;
|
||||||
use Composer\Util\HttpDownloader;
|
use Composer\Util\HttpDownloader;
|
||||||
use Composer\EventDispatcher\ScriptExecutionException;
|
use Composer\EventDispatcher\ScriptExecutionException;
|
||||||
use Composer\Exception\NoSslException;
|
use Composer\Exception\NoSslException;
|
||||||
|
use Symfony\Component\Process\Exception\ProcessTimedOutException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The console application that handles the commands
|
* The console application that handles the commands
|
||||||
|
@ -385,6 +386,11 @@ class Application extends BaseApplication
|
||||||
$io->writeError('<error>Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details</error>', true, IOInterface::QUIET);
|
$io->writeError('<error>Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details</error>', true, IOInterface::QUIET);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($exception instanceof ProcessTimedOutException) {
|
||||||
|
$io->writeError('<error>The following exception is caused by a process timeout</error>', true, IOInterface::QUIET);
|
||||||
|
$io->writeError('<error>Check https://getcomposer.org/doc/06-config.md#process-timeout for details</error>', true, IOInterface::QUIET);
|
||||||
|
}
|
||||||
|
|
||||||
if ($hints = HttpDownloader::getExceptionHints($exception)) {
|
if ($hints = HttpDownloader::getExceptionHints($exception)) {
|
||||||
foreach ($hints as $hint) {
|
foreach ($hints as $hint) {
|
||||||
$io->writeError($hint, true, IOInterface::QUIET);
|
$io->writeError($hint, true, IOInterface::QUIET);
|
||||||
|
|
|
@ -367,11 +367,17 @@ class ProcessExecutor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return int the timeout in seconds
|
||||||
|
*/
|
||||||
public static function getTimeout()
|
public static function getTimeout()
|
||||||
{
|
{
|
||||||
return static::$timeout;
|
return static::$timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int $timeout the timeout in seconds
|
||||||
|
*/
|
||||||
public static function setTimeout($timeout)
|
public static function setTimeout($timeout)
|
||||||
{
|
{
|
||||||
static::$timeout = $timeout;
|
static::$timeout = $timeout;
|
||||||
|
|
Loading…
Reference in New Issue