public function pipeOutputTo(Command $cmd) : void
    {
        if (!$this->canPipe()) {
            throw new RuntimeException('Can\'t pipe output');
        }
        $this->pipeline[] = $cmd;
    }