mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 00:50:18 +01:00 
			
		
		
		
	Merge pull request #364 from Dgc2002/composer-install-timeout
[FEATURE] Added support for specifying task timeout in composer install task
This commit is contained in:
		
						commit
						49b96e00a8
					
				@ -36,7 +36,7 @@ class InstallTask extends AbstractTask
 | 
				
			|||||||
        $cmd = sprintf('%s install %s', $options['path'], $options['flags']);
 | 
					        $cmd = sprintf('%s install %s', $options['path'], $options['flags']);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /** @var Process $process */
 | 
					        /** @var Process $process */
 | 
				
			||||||
        $process = $this->runtime->runCommand(trim($cmd));
 | 
					        $process = $this->runtime->runCommand(trim($cmd), $options['timeout']);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return $process->isSuccessful();
 | 
					        return $process->isSuccessful();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -44,7 +44,7 @@ class InstallTask extends AbstractTask
 | 
				
			|||||||
    protected function getOptions()
 | 
					    protected function getOptions()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $options = array_merge(
 | 
					        $options = array_merge(
 | 
				
			||||||
            ['path' => 'composer', 'flags' => '--optimize-autoloader'],
 | 
					            ['path' => 'composer', 'flags' => '--optimize-autoloader', 'timeout' => 120],
 | 
				
			||||||
            $this->runtime->getMergedOption('composer'),
 | 
					            $this->runtime->getMergedOption('composer'),
 | 
				
			||||||
            $this->options
 | 
					            $this->options
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user