public function streamOutput(bool $streamOutput = true): void
    {
        if ($streamOutput && ! isset($this->gitOutputListener)) {
            $this->gitOutputListener = new GitOutputStreamListener();
            $this->addOutputListener($this->gitOutputListener);
        }

        if (! $streamOutput && isset($this->gitOutputListener)) {
            $this->removeOutputListener($this->gitOutputListener);
            unset($this->gitOutputListener);
        }
    }