Skip to content

Commit 71afded

Browse files
authored
Merge pull request #355 from lando/354-2-many-colons
#354: Fixed bug causing too many colons error on config file mounts o…
2 parents b7a58bb + 6e39008 commit 71afded

File tree

4 files changed

+25
-19
lines changed

4 files changed

+25
-19
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})
22

3+
### Bug Fixes
4+
5+
* Fixed bug causing `too many colons` error on Windows [#354]https://github.com/lando/core/pull/354
6+
37
## v3.24.2 - [March 13, 2025](https://github.com/lando/core/releases/tag/v3.24.2)
48

59
### Bug Fixes

builders/_lando.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,14 @@ module.exports = {
150150

151151
// Handle custom config files
152152
for (let [remote, local] of Object.entries(config)) {
153-
// if we dont have entries we can work with then just go to the next iteration
154-
const isValidLocal = typeof local === 'string' || local?.constructor?.name === 'ImportString';
155-
if (!_.has(remoteFiles, remote) && (typeof remote !== 'string' || !isValidLocal)) continue;
153+
// if remote does not start with / them assume it is a remote file key
154+
if (!remote.startsWith('/')) remote = remoteFiles[remote];
156155

157-
// if this is special type then get it from remoteFile
158-
remote = _.has(remoteFiles, remote) ? remoteFiles[remote] : path.resolve('/', remote);
156+
// if we get here and remote is undefined then we should skip to the next iteration
157+
if (!remote) continue;
158+
159+
// if local is not a valid import type then also continue
160+
if (typeof local !== 'string' && local?.constructor?.name !== 'ImportString') continue;
159161

160162
// if file is an imported string lets just get the file path instead
161163
if (local?.constructor?.name === 'ImportString') {

docs/getting-started/what-it-do.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ We've found a useful pattern here is for the senior-est, most DevOps-y person on
1616

1717
In order for you to get started using the awesome power of Lando, you need to have the following:
1818

19-
* A [Landofile](https://docs.lando.dev/config), generally this is called `.lando.yml`
19+
* A [Landofile](https://docs.lando.dev/landofile), generally this is called `.lando.yml`
2020
* Your application's codebase
2121

2222
If you are unclear on how to manually set this up, check out our [lando init](https://docs.lando.dev/cli/init.html) command which can help you initialize code from various sources for use with Lando.
2323

2424
## So, what does this Landofile look like anyway?
2525

26-
As mentioned above, the Landofile is generally named `.lando.yml` but is both [configurable](https://docs.lando.dev/config) and [overridable](https://docs.lando.dev/config). It needs a `name`, but beyond that, it can contain any combination things, although generally it only uses a small subset as follows:
26+
As mentioned above, the Landofile is generally named `.lando.yml` but is both [configurable](https://docs.lando.dev/landofile) and [overridable](https://docs.lando.dev/landofile). It needs a `name`, but beyond that, it can contain any combination things, although generally it only uses a small subset as follows:
2727

2828
```yaml
2929
name: my-app
@@ -55,25 +55,25 @@ Note that the values in each key above are not particularly relevant to what we
5555
5656
**name** - Nothing special here. This should be a unique way for you to identify your app.
5757
58-
**compose** - This is a list of `docker-compose` files you can tell Lando to start. The paths are relative to the root of your project. Generally, this option is not used in favor of Lando [recipes](https://docs.lando.dev/config/recipes.html) and/or [services](https://docs.lando.dev/config/services.html) but is an option that makes sense under some circumstances.
58+
**compose** - This is a list of `docker-compose` files you can tell Lando to start. The paths are relative to the root of your project. Generally, this option is not used in favor of Lando [recipes](https://docs.lando.dev/landofile/recipes.html) and/or [services](https://docs.lando.dev/landofile/services.html) but is an option that makes sense under some circumstances.
5959

6060
Note that services located in these files will still get injected with Lando's [default environment variables](https://docs.lando.dev/config/env.html#default-environment-variables) and also be [networked](https://docs.lando.dev/config/networking.html) like any other Lando service but will not get any of the extra Lando *secret sauce*.
6161

6262
If you are interested in using something Lando does not currently offer as a service or recipe, we recommend looking at the [custom compose](https://docs.lando.dev/compose) service.
6363

6464
**[env_file](https://docs.lando.dev/config/env.html#environment-files)** - A list of environment files relative to your project's root directory. Each file should contain a list of `KEY=VALUE` pairs that will then get injected into the environment of **every** service.
6565

66-
**[events](https://docs.lando.dev/config/events.html)** - Events allow the user to run arbitrary commands, or combinations of commands, on arbitrary services, or combinations of services before or after certain parts of the Lando runtime. A good example is clearing out an application's cache after a database is imported.
66+
**[events](https://docs.lando.dev/landofile/events.html)** - Events allow the user to run arbitrary commands, or combinations of commands, on arbitrary services, or combinations of services before or after certain parts of the Lando runtime. A good example is clearing out an application's cache after a database is imported.
6767

68-
**[recipe](https://docs.lando.dev/config/recipes.html)** - Recipes are combinations of [services](https://docs.lando.dev/config/services.html), [proxies](https://docs.lando.dev/config/proxy.html), and [tooling](https://docs.lando.dev/config/tooling.html) designed as a start-state-of-sane-defaults for a particular use case - e.g. `drupal9`.
68+
**[recipe](https://docs.lando.dev/landofile/recipes.html)** - Recipes are combinations of [services](https://docs.lando.dev/landofile/services.html), [proxies](https://docs.lando.dev/landofile/proxy.html), and [tooling](https://docs.lando.dev/landofile/tooling.html) designed as a start-state-of-sane-defaults for a particular use case - e.g. `drupal9`.
6969

70-
**[config](https://docs.lando.dev/config/recipes.html#config)** - Config allows you to set some of the more important things your recipe provides. These settings are usually different depending on the recipe you select.
70+
**[config](https://docs.lando.dev/landofile/recipes.html#config)** - Config allows you to set some of the more important things your recipe provides. These settings are usually different depending on the recipe you select.
7171

72-
**[proxy](https://docs.lando.dev/config/proxy.html)** - Proxy settings allow users to map arbitrary domain names to arbitrary ports inside of arbitrary services. Think: I go to the browser and type in `myapp.lndo.site` or `millard.filmore.for.lyfe` and it loads my application.
72+
**[proxy](https://docs.lando.dev/landofile/proxy.html)** - Proxy settings allow users to map arbitrary domain names to arbitrary ports inside of arbitrary services. Think: I go to the browser and type in `myapp.lndo.site` or `millard.filmore.for.lyfe` and it loads my application.
7373

74-
**[services](https://docs.lando.dev/config/services.html)** - Services are simplified but still highly configurable Docker containers. They are able to run [build steps](https://docs.lando.dev/config/services.html#build-steps) such as installing a `php-extension` or running `yarn install` and can also be [overridden](https://docs.lando.dev/config/services.html#overrides) down to the `docker-compose` level. They also get some automatic [networking](https://docs.lando.dev/config/networking.html) and [security](https://docs.lando.dev/config/security.html) features.
74+
**[services](https://docs.lando.dev/landofile/services.html)** - Services are simplified but still highly configurable Docker containers. They are able to run [build steps](https://docs.lando.dev/landofile/services.html#build-steps) such as installing a `php-extension` or running `yarn install` and can also be [overridden](https://docs.lando.dev/landofile/services.html#overrides) down to the `docker-compose` level. They also get some automatic [networking](https://docs.lando.dev/config/networking.html) and [security](https://docs.lando.dev/config/security.html) features.
7575

76-
**[tooling](https://docs.lando.dev/config/tooling.html)** - Tooling allows users to run arbitrary commands, or combinations of commands, on arbitrary services, or combinations of services when invoked.
76+
**[tooling](https://docs.lando.dev/landofile/tooling.html)** - Tooling allows users to run arbitrary commands, or combinations of commands, on arbitrary services, or combinations of services when invoked.
7777

7878
This is helpful so you can run `lando yarn install` instead of `docker exec -it SERVICE yarn install` or so `lando test` can run `composer test` and `yarn test` in their respective services. You can also specify options, including interactive ones, to build out more complicated commands like `lando pull-my-database-from-aws --user=me --password=***` or to have a single command run on many services - e.g. `lando db-import dump.sql -h database2`.
7979

@@ -83,10 +83,10 @@ This is helpful so you can run `lando yarn install` instead of `docker exec -it
8383

8484
There are various ways to craft your Landofile but we've found and observed a strategy to be *generally a good approach* as follows:
8585

86-
1. Shop around for a [recipe](https://docs.lando.dev/config/recipes.html) that can serve as a good starting point. [lando init](https://docs.lando.dev/cli/init.html) is helpful for this.
87-
2. Add in additional [services](https://docs.lando.dev/config/recipes.html) when you need more **JUICE**.
88-
3. Define more complex [tooling](https://docs.lando.dev/config/tooling.html) and [events](https://docs.lando.dev/config/events.html) to simplify difficult command patterns and automate common tasks.
89-
4. Add in some [build steps](https://docs.lando.dev/config/services.html#build-steps) to further automate setting your services up or to mix in additional project dependencies.
86+
1. Shop around for a [recipe](https://docs.lando.dev/landofile/recipes.html) that can serve as a good starting point. [lando init](https://docs.lando.dev/cli/init.html) is helpful for this.
87+
2. Add in additional [services](https://docs.lando.dev/landofile/recipes.html) when you need more **JUICE**.
88+
3. Define more complex [tooling](https://docs.lando.dev/landofile/tooling.html) and [events](https://docs.lando.dev/landofile/events.html) to simplify difficult command patterns and automate common tasks.
89+
4. Add in some [build steps](https://docs.lando.dev/landofile/services.html#build-steps) to further automate setting your services up or to mix in additional project dependencies.
9090
5. Define [custom services](https://docs.lando.dev/compose) as a catch all for anything else you need.
9191
6. Create [custom recipes or services](https://docs.lando.dev/contrib/contrib-plugins.html) to lock down your new power tools.
9292
7. Rinse and repeat.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)