mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 09:12:51 +01:00
Possible override of runLocally task with timeout parameter optional.
This commit is contained in:
parent
65d7f416a5
commit
a2ffc2259d
@ -207,12 +207,14 @@ function run($command)
|
||||
/**
|
||||
* Execute commands on local machine.
|
||||
* @param string $command Command to run locally.
|
||||
* @param int $timeout (optional) Override process command timeout in seconds.
|
||||
* @return string Output of command.
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
function runLocally($command)
|
||||
function runLocally($command, $timeout=60)
|
||||
{
|
||||
$process = new Symfony\Component\Process\Process($command);
|
||||
$process->setTimeout( $timeout );
|
||||
$process->run();
|
||||
|
||||
if (!$process->isSuccessful()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user