Tooling - Dynamic service commands enhancment
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 62
- Forks
- 41
- Avg merge
- 2h 1m
- Merged PRs (30d)
- 2
Description
basic idea:
using your example:
tooling:
php-version:
service: :service
cmd: php -v
options:
service:
default: appserver
describe: Run php in different service
But switched to something more usefull like composer:
tooling:
composer:
service: :service
cmd: php -v
options:
service:
default: appserver
describe: Run composer in different service
Issue is that i need to trigger the correct composer based on the service:
currently core code looks for the dir in the tool -- which does not help,
could the method in the lando tooling utils do something like:
exports.buildCommand = (app, command, service, user, env = {}, dir = undefined) => ({
id: `${app.project}_${service}_1`,
compose: app.compose,
project: app.project,
cmd: command,
opts: {
environment: getCliEnvironment(env),
mode: 'attach',
workdir: dir || getServicePath(service) || getContainerPath(app.root),
user: (user === null) ? getUser(service, app.info) : user,
services: _.compact([service]),
hijack: false,
autoRemove: true,
},
});
Thereby reading the dir option on the service definition?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Lando tooling utilities entry point named in the issue, especially buildCommand, and inspect how tool commands currently determine their working directory. Then trace the service definition's dir option and verify how a service-specific Composer command should resolve its path; done means the selected service runs the intended command from the expected directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100