Skip to content
Open
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})

* Fixed crash when `config.yml` is empty instead of containing `{}` [#439](https://github.com/lando/core/issues/439)

## v3.26.2 - [December 17, 2025](https://github.com/lando/core/releases/tag/v3.26.2)

* Updated to use new Lando Alliance Apple Developer certificates
Expand Down
2 changes: 1 addition & 1 deletion lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ module.exports = class Cli {
const Yaml = require(`../lib/yaml`);
const yaml = new Yaml();
const configFile = path.join(this.defaultConfig().userConfRoot, 'config.yml');
const config = (fs.existsSync(configFile)) ? yaml.load(configFile) : {};
const config = (fs.existsSync(configFile)) ? yaml.load(configFile) || {} : {};
const file = yaml.dump(configFile, _.assign({}, config, data));
return yaml.load(file);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/lando.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ module.exports = class Lando {
}

// Load the config and augment so we can get an App
const config = lmerge({}, ..._.map(landoFiles, file => yaml.load(file)));
const config = lmerge({}, ..._.map(landoFiles, file => yaml.load(file) || {}));
this.log.info('loading app %s from config files', config.name, landoFiles);
// Return us some app!
const App = require('./app');
Expand Down
2 changes: 1 addition & 1 deletion utils/load-config-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module.exports = files => _(files)
.filter(source => fs.existsSync(source) || fs.existsSync(source.file))
// If the file is just a string lets map it to an object
.map(source => {
return _.isString(source) ? {file: source, data: yaml.load(fs.readFileSync(source))} : source;
return _.isString(source) ? {file: source, data: yaml.load(fs.readFileSync(source)) || {}} : source;
})
// Add on the root directory for mapping purposes
.map(source => _.merge({}, source, {root: path.dirname(source.file)}))
Expand Down
Loading