diff --git a/PHPCI/Plugin/Shell.php b/PHPCI/Plugin/Shell.php index df89c4bf..0aaea30e 100644 --- a/PHPCI/Plugin/Shell.php +++ b/PHPCI/Plugin/Shell.php @@ -15,6 +15,7 @@ use PHPCI\Model\Build; /** * Shell Plugin - Allows execute shell commands. + * * @author Kinn Coelho JuliĆ£o * @package PHPCI * @subpackage Plugins @@ -59,6 +60,7 @@ class Shell implements \PHPCI\Plugin // Keeping this for backwards compatibility, new projects should use interpolation vars. $options['command'] = str_replace("%buildpath%", $this->phpci->buildPath, $options['command']); $this->commands = array($options['command']); + return; } @@ -87,7 +89,7 @@ class Shell implements \PHPCI\Plugin foreach ($this->commands as $command) { $command = $this->phpci->interpolate($command); - print_r($command); + if (!$this->phpci->executeCommand($command)) { $success = false; } diff --git a/PHPCI/Plugin/Shell2.php b/PHPCI/Plugin/Shell2.php index 3e3bfc2e..5186a389 100644 --- a/PHPCI/Plugin/Shell2.php +++ b/PHPCI/Plugin/Shell2.php @@ -37,7 +37,7 @@ class Shell2 implements \PHPCI\Plugin /** * @var string[] $commands The commands to be executed */ - protected $commands = array(); + protected $command; /** * Standard Constructor @@ -58,8 +58,8 @@ class Shell2 implements \PHPCI\Plugin if (isset($options['command'])) { // Keeping this for backwards compatibility, new projects should use interpolation vars. - $options['command'] = str_replace("%buildpath%", $options['directory'], $options['command']); - $this->commands = $options['command']; + $options['command'] = str_replace("%buildpath%", $this->phpci->buildPath, $options['command']); + $this->command = $options['command']; return; } @@ -76,7 +76,7 @@ class Shell2 implements \PHPCI\Plugin $success = true; - if (!$this->phpci->executeCommand($this->commands)) { + if (!$this->phpci->executeCommand($this->command)) { $success = false; }