public function __construct()

in src/Utils/Gcloud.php [28:51]


    public function __construct()
    {
        $auths = exec(
            escapeshellcmd('gcloud auth list --format=value(account)'),
            $output,
            $ret
        );
        if ($ret !== 0) {
            throw new \RuntimeException('gcloud failed');
        }
        if (empty($auths)) {
            throw new \RuntimeException('gcloud not authenticated');
        }
        $project = exec(
            escapeshellcmd(
                'gcloud config list core/project --format=value(core.project)'
            ),
            $output,
            $ret
        );
        if (empty($project)) {
            throw new \RuntimeException('gcloud project configuration not set');
        }
    }