public function getVersion()
    {
        if (empty($this->drushVersion)) {
            $isPrinted = $this->isPrinted;
            $this->isPrinted = false;
            $result = $this->executeCommand($this->executable . ' version');
            $output = $result->getMessage();
            $this->drushVersion = 'unknown';
            if (preg_match('#[0-9.]+#', $output, $matches)) {
                $this->drushVersion = $matches[0];
            }
            $this->isPrinted = $isPrinted;
        }

        return $this->drushVersion;
    }