MINOR Added "verbose" flag to SilverStripeBuildTask

This commit is contained in:
Ingo Schommer 2011-05-01 18:30:23 +12:00
parent 23f5340c85
commit 2215f97afc

View File

@ -10,7 +10,13 @@ All code covered by the BSD license located at http://silverstripe.org/bsd-licen
* @author marcus
*/
abstract class SilverStripeBuildTask extends Task {
protected $cleanupEnv = false;
/**
* @var boolean
*/
protected $verbose = false;
protected $cleanupEnv = false;
protected function configureEnvFile() {
// fake the _ss_environment.php file for the moment
@ -65,6 +71,9 @@ TEXT;
function exec($cmd, $returnContent = false, $ignoreError = false) {
$ret = null;
$return = null;
if($this->verbose) $this->log($cmd);
if ($returnContent) {
$ret = shell_exec($cmd);
} else {