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

recipe related fixes #204

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})

## Bug Fixes

* Fixed bug causing preexisting `urls` in `lando info` to be clobbered by `localhost` port discovery
* Fixed bug causing `allServices` to sometimes be unset in some recipe tasks

## v3.22.0-beta.6 - [September 4, 2024](https://github.com/lando/core/releases/tag/v3.22.0-beta.6)

* This release contains only tests and is mostly to keep version sync with the CLI
Expand Down
12 changes: 11 additions & 1 deletion hooks/app-find-localhosts.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,15 @@ module.exports = async (app, lando) => {
getHttpsPorts(data),
lando.config.bindAddress,
))
.map(data => _.find(app.info, {service: data.service}).urls = data.urls);
// add data to existing info
.map(data => {
// get info
const info = _.find(app.info, {service: data.service});
// remove existing localhosts because they are probably stale
_.remove(info.urls, url => url.startsWith('http://localhost'));
_.remove(info.urls, url => url.startsWith('https://localhost'));
// and then reset
info.urls = _.uniq([...info.urls, ...data.urls]);
});
;
};
2 changes: 1 addition & 1 deletion tasks/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module.exports = (lando, config = lando.appConfig) => ({
}

// nice things
const aservices = app.config.allServices ?? [];
const aservices = app?.config?.allServices ?? app?.allServices ?? [];
const choices = `[${color.green('choices:')} ${aservices.map(service => `"${service}"`).join(', ')}]`;

// gather our options
Expand Down
Loading