protected function findDrushMakeFile($required = false, $core = false)
    {
        $candidates = [
            'project.make.yml',
            'project.make',
            'drupal-org.make.yml',
            'drupal-org.make',
        ];
        if (!empty($this->settings['lock'])) {
            $candidates = array_merge([
                'project.make.lock',
                'project.make.yml.lock',
                'drupal-org.make.yml.lock',
                'drupal-org.make.lock',
            ], $candidates);
        }
        foreach ($candidates as &$candidate) {
            if ($core) {
                $candidate = str_replace('.make', '-core.make', $candidate);
            }
            if (file_exists($this->appRoot . '/' . $candidate)) {
                return $this->appRoot . '/' . $candidate;
            }
        }

        if ($required) {
            throw new \Exception(
                ($core
                    ? "Couldn't find a core make file in the directory."
                    : "Couldn't find a make file in the directory."
                ) . " Possible filenames: " . implode(',', $candidates)
            );
        }

        return false;
    }