Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create default app_service based on first service #5

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gilzow
Copy link
Contributor

@gilzow gilzow commented Nov 19, 2021

If available, uses the first service in options._app.info which is typically the primary service, to use as the default app_service but if not available, retains the previous appserver value. Also still allows for the value to be overridden from the lando.yaml file.

Closes #3

Comment on lines +27 to +31
const closestService = _.first(options._app.info);
//now double-check to make sure the service object exists in config services.
if(options._app.config.services.hasOwnProperty(closestService.service)) {
config.app_service = closestService.service;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

WS alignment 😉

Suggested change
const closestService = _.first(options._app.info);
//now double-check to make sure the service object exists in config services.
if(options._app.config.services.hasOwnProperty(closestService.service)) {
config.app_service = closestService.service;
}
const closestService = _.first(options._app.info);
// now double-check to make sure the service object exists in config services.
if(options._app.config.services.hasOwnProperty(closestService.service)) {
config.app_service = closestService.service;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

my bad. Was using a different IDE from my preferred. Do we have a .editorconfig file we use to ensure proper spacing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants