Skip to content

Commit 0543b01

Browse files
committed
cl and engine stuff
1 parent 9292bdd commit 0543b01

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## v3.20.1 - [September 28, 2023](https://github.com/lando/cli/releases/tag/3.20.1)
2+
3+
### Fixes
4+
5+
* Fixed bug causing `Invalid host defined options` when using `lando` renderer in `packaged` mode [#216](https://github.com/lando/cli/issues/216)
6+
17
## v3.20.0 - [September 22, 2023](https://github.com/lando/cli/releases/tag/3.20.0)
28

39
### New Features

lib/formatters.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,23 @@ exports.handleInteractive = (inquiry, argv, command, lando) => lando.Promise.try
9494
else {
9595
const inquirer = require('inquirer');
9696
inquirer.registerPrompt('autocomplete', require('inquirer-autocomplete-prompt'));
97+
// Try to rebuild the inquiry if this is app level bootstrap and we have an app
98+
if (!_.isEmpty(argv._app) && lando._bootstrap === 'engine') {
99+
// get id
100+
const getId = command => {
101+
if (typeof command === 'string') return command.split(' ')[0];
102+
return command;
103+
};
104+
const tooling = _(_.get(argv, '_app.tooling', {}))
105+
.map((tooling, command) => _.merge({}, tooling, {command}))
106+
.concat(lando.tasks)
107+
.map(command => _.merge({}, command, {id: command.id || getId(command.command)}))
108+
.value();
109+
110+
inquiry = exports.getInteractive(_.find(tooling, {id: command}).options, argv);
111+
return inquirer.prompt(_.sortBy(inquiry, 'weight'));
112+
}
113+
97114
// Try to rebuild the inquiry if this is app level bootstrap and we have an app
98115
if (!_.isEmpty(argv._app) && lando._bootstrap === 'app') {
99116
// NOTE: We need to clone deep here otherwise any apps with interactive options get 2x all their events
@@ -103,6 +120,7 @@ exports.handleInteractive = (inquiry, argv, command, lando) => lando.Promise.try
103120
inquiry = exports.getInteractive(_.find(app.tasks.concat(lando.tasks), {command: command}).options, argv);
104121
return inquirer.prompt(_.sortBy(inquiry, 'weight'));
105122
});
123+
106124
// Otherwise just run
107125
} else {
108126
inquiry = exports.getInteractive(_.find(lando.tasks, {command: command}).options, argv);

0 commit comments

Comments
 (0)