Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Resolve GCLOUD_CONFIG/APPENGINE_CONFIG late #321

Merged
merged 3 commits into from
Jan 10, 2019

Conversation

loosebazooka
Copy link
Contributor

If a user doesn't have the cloud sdk installed yet, but uses
GCLOUD_CONFIG, it results in a cloud sdk not found error.

While this seems like a strange case, it's safest for us
to only even attempt anything after we can guarantee the cloud
sdk is setup.

If a user doesn't have the cloud sdk installed yet, but uses
GCLOUD_CONFIG, it results in a cloud sdk not found error.

While this seems like a strange case, it's safest for us
to only even attempt anything after we can guarantee the cloud
sdk is setup.
}

/**
* Process user configuration of "projectId". If not configured or set to APPENGINE_CONFIG (not
* allowed for app.yaml based projects), show usage. If set to GCLOUD_CONFIG then read from
* gcloud's global state. If set but not a keyword then just return the set value.
*/
@Override
public String getProject(String configString) {
if (configString == null
|| configString.trim().isEmpty()
|| configString.equals(APPENGINE_CONFIG)) {
throw new GradleException(PROJECT_ERROR);
} else if (configString.equals(GCLOUD_CONFIG)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tiny nit: can remove elses

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah, weird that I did that, must be losing my mind.

@loosebazooka loosebazooka merged commit 8b7ea8e into master Jan 10, 2019
@loosebazooka loosebazooka deleted the laterProcessingOfParameters branch April 10, 2019 17:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants