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

Docker tasks print TaskInfo twice #576

Closed
kitgrose opened this issue May 12, 2017 · 1 comment
Closed

Docker tasks print TaskInfo twice #576

kitgrose opened this issue May 12, 2017 · 1 comment

Comments

@kitgrose
Copy link
Contributor

Steps to reproduce

Add the following task to your RoboFile and run it (where container_id is the name of a valid Linux Docker container).

public function test() {
    $this->taskDockerExec('container_id')->exec('ls')->run();
}

Expected behavior

The output should contain the following text once before the output of ls:

 [Docker\Exec] Running docker exec  container_id ls

Actual behavior

The output contains that line twice:

 [Docker\Exec] Running docker exec  container_id ls
 [Docker\Exec] Running docker exec  container_id ls

This is apparently caused by line 23 of src/Task/Docker/Base.php, which prints the task info. The task info is already being printed as part of ExecTrait as part of printAction() (called by execute()).

As far as I can tell it seems like the best solution is simply to remove line 23 of src/Task/Docker/Base.php and rely on ExecTrait to print the task info (but I'm not yet familiar enough with the Robo codebase to be confident about that).

System Configuration

macOS Sierra v10.12.4. PHP 5.6.8.

@greg-1-anderson
Copy link
Member

Sounds right to me. If the suggested fix clears up the problem for you, a PR would be welcome.

kitgrose added a commit to kitgrose/Robo that referenced this issue May 12, 2017
greg-1-anderson pushed a commit that referenced this issue May 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants