public function getOutputPath()
    {
        $base = getcwd() . DIRECTORY_SEPARATOR;

        if (isset($this->raw->output)) {
            $path = $this->raw->output;

            if (false === Path::isAbsolute($path)) {
                $path = Path::canonical($base . $path);
            }
        } else {
            $path = $base . 'default.phar';
        }

        if (false !== strpos($path, '@' . 'git-version@')) {
            $path = str_replace('@' . 'git-version@', $this->getGitVersion(), $path);
        }

        return $path;
    }