From c5b20b48911e9813610a99bcefcb878c36748522 Mon Sep 17 00:00:00 2001 From: Dan Cryer Date: Wed, 22 May 2013 17:23:35 +0100 Subject: [PATCH] Adding Shell plugin, but with the requirement that ENABLE_SHELL_PLUGIN must be defined and true, to give sysadmins some control. Closes #45. --- PHPCI/Plugin/Shell.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PHPCI/Plugin/Shell.php b/PHPCI/Plugin/Shell.php index 602824ec..83595ad8 100644 --- a/PHPCI/Plugin/Shell.php +++ b/PHPCI/Plugin/Shell.php @@ -41,6 +41,10 @@ class Shell implements \PHPCI\Plugin */ public function execute() { + if (!defined('ENABLE_SHELL_PLUGIN') || !ENABLE_SHELL_PLUGIN) { + throw new \Exception('The shell plugin is not enabled.'); + } + $success = $this->phpci->executeCommand($this->command); return $success;