protected function getBuildFile()
    {
        $buildfile = getcwd().'/build.yml';

        if (true === $this->input->hasParameterOption('--buildfile')) {
            $buildfile = realpath($this->input->getParameterOption('--buildfile'));
        }

        if (is_file($buildfile) && is_readable($buildfile)) {
            return $buildfile;
        }

        throw new \Exception(
            sprintf('Could not find build file "%s"', $buildfile)
        );
    }