Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reducing DrushTask default verbosity. #581

Merged
merged 1 commit into from
Oct 18, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions phing/phingcludes/DrushTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,10 @@ public function main() {
$option = new DrushOption();
$option->setName('verbose');
$this->options[] = $option;
$exec_level = Project::MSG_INFO;
}
else {
$exec_level = Project::MSG_VERBOSE;
}

foreach ($this->options as $option) {
Expand All @@ -304,9 +308,8 @@ public function main() {
$command[] = $param->getValue();
}


if (!empty($this->dir)) {
$this->log("Changing working directory to: $this->dir");
$this->log("Changing working directory to: $this->dir", $exec_level);
$initial_cwd = getcwd();
chdir($this->dir);
}
Expand All @@ -317,15 +320,15 @@ public function main() {

if ($this->passthru) {
$command = implode(' ', $command);
$this->log("Executing: $command");
$this->log("Executing: $command", $exec_level);
passthru($command, $return);
}
else {
// Redirect sterr to stout for Phing log.
$command[] = '2>&1';

$command = implode(' ', $command);
$this->log("Executing: $command");
$this->log("Executing: $command", $exec_level);
exec($command, $output, $return);

if ($this->logoutput) {
Expand All @@ -337,7 +340,7 @@ public function main() {
}

if (isset($initial_cwd)) {
$this->log("Changing working directory back to $initial_cwd.");
$this->log("Changing working directory back to $initial_cwd.", $exec_level);
chdir($initial_cwd);
}

Expand Down