1
0
Fork 0

Merge pull request #8088 from beryllium/disable-process-timeout-helper

Add a helper to disable process timeouts
pull/8085/head^2
Jordi Boggiano 2019-04-09 10:38:06 +02:00 committed by GitHub
commit 8ac401bbd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 0 deletions

View File

@ -16,6 +16,7 @@ use Composer\Config\ConfigSourceInterface;
use Composer\Downloader\TransportException;
use Composer\IO\IOInterface;
use Composer\Util\Platform;
use Composer\Util\ProcessExecutor;
/**
* @author Jordi Boggiano <j.boggiano@seld.be>
@ -459,4 +460,20 @@ class Config
}
}
}
/**
* Used by long-running custom scripts in composer.json
*
* "scripts": {
* "watch": [
* "Composer\\Config::disableProcessTimeout",
* "vendor/bin/long-running-script --watch"
* ]
* }
*/
public static function disableProcessTimeout()
{
// Override global timeout set earlier by environment or config
ProcessExecutor::setTimeout(0);
}
}